feat(shared): make session token expiry configurable from auth-server config#20801
Open
sreecharan-desu wants to merge 1 commit into
Open
feat(shared): make session token expiry configurable from auth-server config#20801sreecharan-desu wants to merge 1 commit into
sreecharan-desu wants to merge 1 commit into
Conversation
… config Because: * SessionToken expiry was hardcoded to 28 days despite a FIXME to make it configurable from auth-server settings. This commit: * Wire SessionToken.sessionExpiryMs from auth-server tokenLifetimes config. * Add unit tests for session token expiry filtering logic.
Contributor
Author
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.
Because
SessionTokenexpiry filtering used a hardcoded 28-day value with an open FIXME to make it configurable.tokenLifetimes.sessionTokenWithoutDevice; the shared model should respect that setting.This pull request
SessionToken.sessionExpiryMsfrom auth-server config during DB initialization.fxa-shared.Issue that this pull request solves
Closes: (none — addresses FIXME in session-token.ts; split from #19940 per maintainer feedback)
Checklist
How to review (Optional)
packages/fxa-auth-server/lib/db.ts(config wiring)packages/fxa-shared/db/models/auth/session-token.ts(static expiry property)packages/fxa-shared/test/db/models/auth/session-token.spec.ts(new tests)Test plan
yarn test fxa-shared— session-token unit tests pass