New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth session doesn't refresh when using database #77
Comments
At some point it was there: but then it was removed? |
When you call I'll investigate it better. |
I too am running into this issue (I get 401 when I restart my app after the JWT expires). I agree with @GRSouza that (at least from my read of the GoTrue code) the token should already automatically refresh when
|
After some investigation, this is what was causing the erroneous 401 for me (I had kept testing the JWT during the minute where this would have been incorrectly marked as So it should be fixed as of PR 55 for |
Closing this issue as it seems to be solved, if it happens again, we can re-open it. Thank you all for the investigation. |
Hi @bstillitano shouldn't need to manually refresh. I'll reopen this issue to investigate, thanks. |
No probs @grdsdev let me know if I can help in any way. |
Same issue here, is there any news ? |
Are you using PostgresClient directly, or through the SupabaseClient? |
@grdsdev Supabase client only |
Also experiencing the same issue, is there an update on the way? |
Bug report
Describe the bug
If my JWT has expired since I last called
supabaseClient.auth.session
, and I try to execute a command usingsupabaseClient.database
, I get an error about the JWT being expired. I have to work around this by calling_ = supabaseClient.auth.session
before every database call to force it to refresh the token.To Reproduce
Expected behavior
I would expect the session to automatically be refreshed before attempting the database operation.
System information
The text was updated successfully, but these errors were encountered: