Repository navigation
Opt-in "Remember this browser for 30 days" (#205) - #226
Merged
Merged
Conversation
A checkbox on the login form, off by default. With it the session ends 30 days after the login (fixed, not an idle timeout) and the master key is kept in IndexedDB under a non-extractable AES-GCM key, so a new tab or a restarted browser opens a meeting without the password. - AuthSession: remembered_until, a 30-day cookie, and a credential stamp that ends every other session of a user on a password change or reset. The login is written after the session id changes, and closeForReading() drops PHP's re-sent session cookie, which had no expiry. - crypto/rememberedKey.ts: created only by a remembered login, replaced in place by a password change or "Unlock this tab", deleted by logout, by a login that isn't remembered, and when its end date passes. - ensureUnlocked() tries the tab's key, then the remembered one, which it only reads. - docs/encryption.md states what the stored key does and doesn't protect. See docs/decisions/2026-10-04-remember-this-browser.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #205, part of #213.
What it does
A checkbox on the login form, off by default (6 locales; the translations are mine and not native-speaker-reviewed). With it:
Without the checkbox nothing changes.
Where it differs from the issue
docs/encryption.mdsays plainly that anyone who can use the browser, or read its profile, can read the 1:1s for up to 30 days.authHashin the session, no token table. A password change elsewhere leads to the login screen, not "Unlock this tab".BroadcastChannelalternative wasn't built.Found along the way
closeForReading()handles, turning the 30-day cookie back into a browser-session one.closeForReading()now removes that header, through Symfony's@internalSessionUtils; the e2e restart test is what would catch that changing.migrate()saves the session under its old id first, which would have left a working login there. The login is now written after the id changes.Accepted limits
Listed in the decision record. The main ones:
gc_maxlifetimeis 31 days for every session file.Verification
npm ci.frontend/e2e/remember-browser.spec.ts: real crypto against the e2e stack, a persistent Chromium profile closed and launched again as the browser restart.curlon the e2e stack:Max-Age=2592000on a remembered login, no re-sent cookie on/api/me, 401 for the pre-login session id.code-reviewrounds; the last returned only points already under "Accepted limits".Notes for review
fake-indexeddb(Apache-2.0).AnketaControllerTestandpassword-change-drafts.spec.ts.See
docs/decisions/2026-10-04-remember-this-browser.md.🤖 Generated with Claude Code