-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
Tokens not getting auto-refreshed #32
Comments
@awalias Thank you for the issue |
@SweeToxin the important thing is that you're using the latest version of |
Confirmed supabase js is 1.1.2 |
@awalias @kiwicopple is this issue still active? |
Note from Omar
I think in gotrue we need the ability to set multiple domain names where a token can be valid from (@awalias ) |
Also to be investigated: #54 |
I'm also running into this issue, or something similar. Specifically, my network requests return a I don't actually get logged out, my network requests just start failing after a certain period of time. If I refresh the page, then I am somehow authenticated again and my network requests work fine. But I would expect the jwt to be auto-refreshed once it is expired, without me reloading the page. Update: This happens not just on |
+1 - same issue here |
possibly related: #61 |
@churichard, @dommarr did you fix this issue? I'm still seeing this problem, and it has made my app unusable. I would appreciate it if you could let us know the solution (if you fixed it). |
@akiarostami I still run into issues with auth, albeit not the same one I ran into in the comment above. I think that one has been fixed. If you're having issues, I'd recommend moving your authentication entirely client-side and not following the Next.js example (which uses SSR). The Next.js example didn't fully work last time I tried to do it; doing things client-side seems to work better. |
Thanks @churichard for the quick reply. There are some issues with moving the authentication fully to the client side as well. In that case, we won't be able to use Next.js's server side features and would have to do all authentication checks, data loading, etc. on the client side as well. I'm currently doing some stuff client-side, but I'm still sporadically getting jwt expiration error when I call Supabase's methods. Don't you see any of that? I hope the wonderful Supabase team pays some attention to this, as it makes the Next.js experience very unpleasant, if not unusable. |
@akiarostami Sorry, I'm not running into any jwt expiration error issues. Maybe you could shoot them an email about it, or open a new issue. |
I am experiencing this as well. Fully client side. JWT token expires if app tab is left open for a while, and everything rendered conditionally based on existence of the session disappears in my UI (of course). Upon refreshing the page, everything works again. Wondering why this was closed if the issue persists? Is there a fix? |
@sjc5 this issue was fixed from what I can remember. |
I am also facing the same issue. Has anyone found a fix around this? |
@rutikwankhade please open a new issue with the problem you are facing. Also outline how to replicate the problem in your new issue. This was fixed and this issue is closed. |
Hi @rutikwankhade I just posted and Issue here #201 that perhaps reproduces your case -- or adds some context. TLDR; you can get into a state where a user has no more valid refresh tokens and then the client can no longer get a new access token -- even though it does try to refresh periodically. If you see similar behavior, please add to the comments on that Issue to track. Thanks! |
reported by Omar:
"encountering forced logouts after ~30 min - 1 hour (not sure how long exactly)"
The text was updated successfully, but these errors were encountered: