feat(auth): require a valid edx JWT in hasNonExpiredAuthToken - #171
Open
sonegillis1 wants to merge 1 commit into
Open
feat(auth): require a valid edx JWT in hasNonExpiredAuthToken#171sonegillis1 wants to merge 1 commit into
sonegillis1 wants to merge 1 commit into
Conversation
SSO login stores the edx JWT (edx_jwt_token) alongside the axd token; a valid session needs both present and unexpired. Add an isJwtExpired helper that reads the JWT `exp` claim (treating undecodable tokens as expired and tokens without `exp` as non-expiring) and gate hasNonExpiredAuthToken on the edx token before the existing axd checks, so re-auth is triggered when the edx JWT is missing or expired. Update the hasNonExpiredAuthToken tests to seed a valid edx token and add coverage for the new edx-token gate and isJwtExpired. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
|
Claude finished @sonegillis1's task —— View job E2E Coverage Bot
✅ E2E Coverage — No IssuesNo new app routes (
|
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
hasNonExpiredAuthTokennow requires a valid edx JWT (edx_jwt_token) in addition to the axd token. SSO login stores the edx JWT alongside the axd token, and a valid session needs both present and unexpired.isJwtExpired(token)— reads the JWTexpclaim; treats undecodable tokens as expired and tokens withoutexpas non-expiring.hasNonExpiredAuthTokenon the edx token (missing or expired ⇒ re-auth) before the existing axd checks.isJwtExpired(helpers.ts ≥95% line coverage).🤖 Generated with Claude Code