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
{{ message }}
Repository navigation
AuthProvider cleanup ejects the response interceptor from the request list #184
AuthProvider registers its interceptor with client.interceptors.response.use but removes it in the effect cleanup with client.interceptors.request.eject (auth.tsx#L151, auth.tsx#L163). The response interceptor is never removed, so every remount of AuthProvider leaves one behind.
Impact
After a remount (Fast Refresh, or tests that render the provider more than once), every API response runs the stale interceptors too. They call checkToken (setToken, setLoading, setReady) on providers that are gone, and on a 401 they would run their old logout. In tests this can also leak state between cases.
Activity