molecule-core/canvas/src
rabbitblood 6730c7713d fix(auth): redirect to login on 401 from any API call
When session credentials expire mid-use, ALL API calls return 401.
Previously this threw a generic error that crashed the UI with no
recovery path. Now the API client intercepts 401 and redirects to
login once (via redirectToLogin which already guards against loops).

Combined with the AuthGate /cp/auth/* path guard, this gives the
correct behavior: credentials lost → redirect to login → user logs
in → return_to sends them back.

[Molecule-Platform-Evolvement-Manager]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 11:16:22 -07:00
..
__tests__ fix(canvas): include NEXT_PUBLIC_PLATFORM_URL in CSP connect-src 2026-04-20 12:55:03 -07:00
app fix(canvas/a11y): orgs/page.tsx — form labels, error announcements, checkout banner 2026-04-22 21:06:20 +00:00
components fix(auth): break infinite redirect loop on /cp/auth/login 2026-04-23 11:16:22 -07:00
hooks initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
lib fix(auth): redirect to login on 401 from any API call 2026-04-23 11:16:22 -07:00
store fix(canvas): cascade-delete UX — require checkbox before Delete All (#1314) 2026-04-21 07:06:45 +00:00
stores initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
styles fix(canvas): C1/C2/C3/C5 dark-theme CSS and ReactFlow colorMode 2026-04-16 10:45:16 +00:00
types feat(canvas): audit trail visualization panel (issue #753) 2026-04-17 16:03:28 +00:00
middleware.ts feat(router): /cp/* reverse-proxy to CP + same-origin canvas fetches 2026-04-20 13:01:40 -07:00