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 }}
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
The issues is that the user gets kicked off the app and needs to sign in again over and over.
After checking the many threads on this issue, these are the two scenarios we face:
The token gets refreshed when I come back to the application after 1 hour which is the default expiration time (see screenshot below where the event is captured), but the immediate next call (and all subsequent ones) fail with the error message "JWT expired"
If I take way longer to come back to the application, the token does not get refreshed an the next request fails with a "invalid_grant Invalid Refresh Token" error.
To Reproduce
The project is using supabase-js and Angular installed as PWA
Create the SupabaseClient with autoRefreshToken set to true.
Sign in a user with supabase.auth.signIn({ email: email, password: password });
Leave the application idle for a bit more than 1 hour for the first case described, or for several hours for the second one
Expected behavior
We are porting from Firebase to Supabase, and our understanding was that the autoRefreshToken should help achieving keeping the user signed in.
There are some other threads where it is proposed to check the result of every call, and if the error is "JWT expired" then try to sign in the user again in the background and retry the original call, but that would be a workaround more than the solution.
System information
Version of supabase-js: 1.33.3
Additional context
Just to say that we are loving Supabase. It would be great to be able to keep our users signed in automatically, otherwise it will be hard to deploy the version backed by Supabase rather than Firebase. Thanks!
Bug report
Describe the bug
The issues is that the user gets kicked off the app and needs to sign in again over and over.
After checking the many threads on this issue, these are the two scenarios we face:
The token gets refreshed when I come back to the application after 1 hour which is the default expiration time (see screenshot below where the event is captured), but the immediate next call (and all subsequent ones) fail with the error message "JWT expired"

If I take way longer to come back to the application, the token does not get refreshed an the next request fails with a "invalid_grant Invalid Refresh Token" error.
To Reproduce
The project is using supabase-js and Angular installed as PWA
SupabaseClientwithautoRefreshTokenset totrue.supabase.auth.signIn({ email: email, password: password });Expected behavior
We are porting from Firebase to Supabase, and our understanding was that the
autoRefreshTokenshould help achieving keeping the user signed in.There are some other threads where it is proposed to check the result of every call, and if the error is "JWT expired" then try to sign in the user again in the background and retry the original call, but that would be a workaround more than the solution.
System information
Additional context
Just to say that we are loving Supabase. It would be great to be able to keep our users signed in automatically, otherwise it will be hard to deploy the version backed by Supabase rather than Firebase. Thanks!