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
Description:
I'm encountering an issue with user sessions and token refresh behavior. Here's the scenario:
I log in to my site, and everything works perfectly.
I open the same site in an incognito window and log in with the same user. Everything works perfectly here too.
However, when I return to the first session (non-incognito), the refresh requests start failing with a 401 error because my backend send an error due to refresh tokens are different.
Despite the 401 errors, the user is not logged out in the original session. They can still navigate through the site and access pages, which is not the expected behavior.
Expected Behavior:
If the refresh or getSession requests throw a 401 or 403 error, the user should be automatically logged out from that session.
Current Configuration:
Below is my current configuration:
Question:
What am I missing in my configuration to ensure that the user is logged out automatically if the refresh or getSession requests fail with a 401 or 403 error? Tried on 0.9.4and 0.10.0
Environment
Reproduction
playground-local with external backend api
Describe the bug
Description:
I'm encountering an issue with user sessions and token refresh behavior. Here's the scenario:
401
error because my backend send an error due to refresh tokens are different.Despite the
401
errors, the user is not logged out in the original session. They can still navigate through the site and access pages, which is not the expected behavior.Expected Behavior:
If the
refresh
orgetSession
requests throw a401
or403
error, the user should be automatically logged out from that session.Current Configuration:
Below is my current configuration:
Question:
What am I missing in my configuration to ensure that the user is logged out automatically if the
refresh
orgetSession
requests fail with a401
or403
error? Tried on0.9.4
and0.10.0
CleanShot.2024-12-20.at.16.28.55.online-video-cutter.com.1.mp4
Additional context
I think the FetchError is not caught it useAuth, here is the errors in console when refresh fails :
Logs
No response
The text was updated successfully, but these errors were encountered: