fix: address SPA test report issues - #13
Open
yogeshchoudhary147 wants to merge 8 commits into
Open
Conversation
yogeshchoudhary147
force-pushed
the
fix/spa-bug-fixes
branch
from
August 23, 2026 14:28
a4763ab to
4b7a84b
Compare
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.
Summary
Fixes and documents all issues identified in the v1.0.0-beta.0 SPA mode test report.
SPA-001 — Added SPA mode section to README covering activation, environment variables, persistent sessions 3-step setup (Allow Offline Access, Refresh Token grant,
localstorage+offline_access), and Auth0 Dashboard config notes.SPA-002 — Fixed
RequireRolethrowingInsufficientScopeErrorduring SPA SDK init before auth state is known; now returnsnullwhileisLoadingis true. Also fixedSignedOutrendering during init — suppresses the login button flash by checkingisLoadingbefore rendering.SPA-003 — Clarified
VITE_AUTH0_AUDIENCEenv var description to explain opaque JWE token vs signed RS256 JWT behavior.SPA-004 — Documented that
getSession,requireSession,getUser,requireUser, andgetAccessTokenalways returnnullor redirect in pure SPA mode, with a substitution table pointing to the client-side equivalents.SPA-005 — Documented
useUser()claim shape differences: RWA returns full ID token claims (iss,aud,iat,exp,sid); SPA returns profile fields only becauseauth0-spa-jsstrips JWT metadata automatically.SPA-006 — Documented the
AuthLoadingpattern for handling the SDK init window so UIs don't snap from blank to authenticated state.SPA-007 — Documented that all loader guards (
requireSession,requireUser) are RWA-only and SPA apps must use component guards (RequireAuth,withAuthenticationRequired).SPA-008 — Added hybrid mode (both
AUTH0_*andVITE_*set simultaneously) to Known Limitations as unsupported, with explanation of the session cookie / localStorage split that causes the security gap.Test plan
RequireRolerenders nothing during SPA init — does not throw for users with the roleRequireRolestill throwsInsufficientScopeErrorfor unauthenticated users after initSignedOutrenders nothing duringisLoading: true— no login button flash on page loadSignedOutrenders children after init when user is not authenticatednpm testpasses