[Fix] Unexpected web logouts when users return to the site - #2306
Merged
Conversation
Contributor
roomote-roomote
Bot
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
September 7, 2026 03:03
Contributor
Author
|
Removed the UI/recovery additions in 4c004b6 and updated the PR description, including removal of obsolete UI screenshots. The remaining scope is the 30-day session policy, reliable browser-cookie/server rolling renewal, 32 server regression tests, and session-policy documentation. All six UI/helper/client-test files now exactly match the PR base; the retained backend files are unchanged by this revision. Verification: 32 focused server tests, web TypeScript, docs validation/link checks, and all pre-push gates passed. No sign-in/admission policy or UI changes remain in the net diff. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The previous seven days was Better Auth's inherited default. A full HTML render could extend the database session while its cookie write failed; subsequent requests then considered renewal unnecessary for another day. The integration regression reproduces that failure and verifies the corrected render-to-route flow.
Still-valid older sessions adopt 30 days on their next renewing browser request. Expired cookies or sessions are not resurrected; no database migration is required. Logout, administrative revocation, password-reset revocation, signing-key invalidation, and existing access policies remain intact. Secure, HttpOnly, SameSite=Lax, host-only cookies and authoritative database checks are unchanged. Longer idle persistence increases the lifetime of a stolen cookie; sleeping or closed browsers do not renew sessions.
How it was tested
Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locally (package TypeScript and full pre-push equivalents passed; root commands not separately run)pnpm changeset