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
changed the title [-]Sentry reports AuthException[/-][+]Sentry reports AuthException(Invalid Refresh Token: Refresh Token Not Found)[/+]on May 14, 2024
I get the same exception when I reopen my web app where I was previously logged in after a longer period of time. I am currently catching this error from the onAuthStateChange Stream but I am not sure how to handle it. When I reload the web-app, the user is logged out and everything works fine.
In my app, even though I see the **** onAuthStateChange: AuthChangeEvent.signedOut log in my console when the "Invalid Refresh Token" exception is thrown, I don't receive the AuthChangeEvent.signedOut event when listening to the onAuthStateChange, instead I receive the exception and have to handle it in some way. Currently, I sign out the user manually, which seems to work.
@dshukertjr What is the preferred way to handle this exception?
I found some more information about this exception here:
Activity
dshukertjr commentedon May 14, 2024
Duplicate of #928
RCVZ commentedon May 14, 2024
@dshukertjr This is not a duplicate! This error states refresh token not found.
dshukertjr commentedon May 14, 2024
@RCVZ Next time when you open an issue, you can give the issue a more descriptive name so that it does not look like a duplicate.
[-]Sentry reports AuthException[/-][+]Sentry reports AuthException(Invalid Refresh Token: Refresh Token Not Found)[/+][-]Sentry reports AuthException(Invalid Refresh Token: Refresh Token Not Found)[/-][+]Sentry reports AuthException(message: Invalid Refresh Token: Refresh Token Not Found, statusCode: 400)[/+]dshukertjr commentedon May 14, 2024
Thanks for updating the title!
Donaldd commentedon May 18, 2024
I've been getting the same issue. User is suddenly logged out of the app and then we get this error message (see below) from Sentry.

jhb-dev commentedon Jul 4, 2024
I get the same exception when I reopen my web app where I was previously logged in after a longer period of time. I am currently catching this error from the
onAuthStateChangeStream but I am not sure how to handle it. When I reload the web-app, the user is logged out and everything works fine.After digging into the _callRefreshToken method in the GoTrue client I found out that the user is automatically signed out on every
AuthExceptionwhich is not aAuthRetryableFetchException. There is also a test to ensure that the user is logged out when the refresh token is invalid.In my app, even though I see the
**** onAuthStateChange: AuthChangeEvent.signedOutlog in my console when the "Invalid Refresh Token" exception is thrown, I don't receive theAuthChangeEvent.signedOutevent when listening to theonAuthStateChange, instead I receive the exception and have to handle it in some way. Currently, I sign out the user manually, which seems to work.@dshukertjr What is the preferred way to handle this exception?
I found some more information about this exception here:
RCVZ commentedon Jul 25, 2024
@dshukertjr When is this issue going to be fixed? 3 months have already passed!
RCVZ commentedon Aug 13, 2024
@dshukertjr ???
github-actions commentedon Mar 1, 2026
This issue has been inactive for 180 days.
It will be automatically closed in 30 days if there is no further activity.
If you believe this issue is still relevant, please leave a comment to keep it open.
Thank you for your contributions!
github-actions commentedon Apr 5, 2026
This issue was automatically closed due to inactivity.
If you believe this is still relevant, feel free to reopen it or create a new issue with updated information.
fix(gotrue): avoid duplicate auth error on recoverSession with invali…