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
fix(api-client): only auto-redirect to /login from /app/* (closes homepage redirect bug) (#53)
Root cause: src/api/index.ts had an inverted skip-list — only /login and
/claim were excluded from the 401→/login auto-redirect. Any other public
route (/, /pricing, /docs, /blog, /use-cases, /status, /incidents) could
get bounced to /login if a stray api call from a hook, Suspense boundary,
or cached service worker returned 401.
Fix: invert the gate. Redirect only when on /app/*. On public routes,
clear the stale token silently and throw the APIError to the caller
without navigating — the page stays renderable for an anonymous visitor.
+1 regression test pinning pathname stability on / when fetchMe returns
401. 92/95 api tests pass.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments