Skip to content

Bump client/shared: fix login lockout for stale/expired sessions - #120

Merged
buzz-code merged 3 commits into
mainfrom
claude/expired-session-redirect-loop-dscdzh
Jul 19, 2026
Merged

buzz-code merged 3 commits into
mainfrom
claude/expired-session-redirect-loop-dscdzh

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Summary

Bumps client/shared (nra-client) to pick up two fixes:

  • The anonymous homepage no longer strands a freshly-logged-in user due to a stale usePermissions() cache right after login.
  • authProvider.checkAuth now validates a cached session against the server (time-boxed to a 5-minute trust window) instead of trusting localStorage.auth's mere presence, which never expires on its own. Previously, a returning user with an old session could get bounced away from the login form forever.

See buzz-code/nra-client#32 for the underlying change and test plan.

Test plan

  • This is the app used to verify both fixes live end-to-end: a real browser (Playwright) against the real react-admin/authProvider code and a mock backend (Docker registry pulls are blocked in this environment). The login-lockout scenario is fixed, normal login flows are unaffected.

Generated by Claude Code

claude added 3 commits July 18, 2026 19:29
usePermissions() caches for 5 minutes and isn't refreshed on login,
so right after logging in from the anonymous homepage the app could
still show the same logged-out homepage instead of the dashboard.
localStorage.auth never expires on its own, so a week-old cached
session could bounce a genuinely logged-out returning user away from
the login form forever - checkAuth now validates against the server
instead of trusting localStorage presence.
Avoids a real network call on every checkAuth invocation (route
changes, tab refocus) while still catching a genuinely stale (e.g.
week-old) session promptly instead of trusting it indefinitely.
@buzz-code
buzz-code merged commit a3484d6 into main Jul 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants