Repository navigation
feat(auth): ruled sidebar app shell, NIST session timeouts, real session revocation - #60
Merged
Merged
Conversation
…ocation - Sessions end after 1 hour idle / 24 hours overall (NIST SP 800-63B-4 AAL2); admins after 15 minutes / 12 hours (AAL3). Enforced in the jwt callback; Node.js middleware slides the cookie on real requests. - User.sessionVersion makes JWT sessions revocable: password change, password reset, deactivation and the new "Sign Out Everywhere" end every session on every device. - Deleted or revoked accounts get no session at all instead of a blank one. - The session check is cached per request (one check per page, not per guard). - In-app inactivity warning two minutes before sign-out.
CodeWithEugene
force-pushed
the
feat/session-security
branch
from
October 1, 2026 17:15
9c39a56 to
9e6dc5b
Compare
This branch was successfully deployed
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.
App shell (signed-in app and admin)
Session timeouts (NIST SP 800-63B-4)
middleware.ts(Node.js runtime) slides the session cookie on real requests from signed-in visitors. It does no access control; the layout guards still decide access.Session revocation
User.sessionVersion(migration9_session_version, additive with default 0). Every token carries the version it was issued under; a stale version ends the session and clears the cookie.React.cache), so a page does it once instead of once per guard.Existing sessions carry no sign-in time, so everyone signs in once after deploy.
Test plan
Max-Age=0and a redirect to /signin; Sign Out Everywhere in the browser ended a second, separately signed-in session