Skip to content

Commit 0536e73

Browse files
Wikid82actions-userclaude
authored
fix(frontend): unregister auth error handler on AuthProvider unmount (#1070)
Issue #579 reported that page reload did not redirect to /login when the session expired. Root-cause tracing showed the reload guard already works on development (all 16 auth E2E tests pass), but the trace surfaced a real hazard: the axios 401 interceptor kept a stale handler closure after AuthProvider unmounted. setAuthErrorHandler now accepts null and the provider unregisters its handler on unmount. Adds regression tests for RequireAuth, AuthContext mount/unmount handler lifecycle, and the client interceptor null-handler path. Closes #579 Co-authored-by: GitHub Actions <actions@github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 30eee6a commit 0536e73

6 files changed

Lines changed: 325 additions & 551 deletions

File tree

0 commit comments

Comments
 (0)