You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(send): recover revoked sessions via silent refresh before forced logout
Address review on #960: on an x-logout (a Keycloak-revoked access token), the
frontend now attempts a silent refresh before tearing the session down, and
only forces logout when the refresh token is also gone. A transient refresh
error keeps the session (fail open).
- auth-store: new recoverOrForceLogout() runs the deduped silent refresh;
refreshAccessToken now records whether a failure was genuine so the decision
keys off the failure kind, not isLoggedIn (which can be false during an
extension cold-start and would otherwise turn a network blip into a logout).
- api.ts / trpc.ts: on x-logout, recover and retry the request once with the
fresh token instead of unconditionally forcing logout. In api.ts x-logout is
branched ahead of the plain-401 path so there is exactly one refresh.
The OIDC refresh token lives only client-side (oidc-client-ts), so this
recovery is necessarily on the frontend; the backend only signals revocation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments