-
Notifications
You must be signed in to change notification settings - Fork 32
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
JWTExpired errors after leaving the app open for a short while #85
Comments
Did you try simple implementation of this without any extra code? |
Can you try latest BETA version https://pub.dev/packages/nhost_sdk/versions/4.0.0-dev.8 It reuiqres you to pass |
It's still there in 4.0.0.dev.13 User gets logged out after some time, automatically. Using all dependencies with 3.x-dev.x versions. Any hints? |
please use new package https://pub.dev/packages/nhost_dart There is a maximum expiry date for the token however refresh token is issued, therefore, you can silently call the Refresh method to renew the token. This will avoid logout user Please see this #91 (comment) |
Hi, Thanks for the quick update. Will go through it and let you know how it goes! |
I'm seeing JWTExpired errors when leaving the app open for a bit, suggesting the token refresh is not working correctly. It's a dealbreaker right now in terms of being able to use nhost in production because after a fairly short amount of time the app breaks because all queries/mutations/subscriptions stop executing and you have to refresh the entire app.
Similar to #21 but the errors I'm seeing are for any type of operation, not just subscriptions, so I don't think it's purely a websocket problem. I also saw nhost/nhost#405 and it seems that the JS library had a very similar issue, so it might be that the Dart/Flutter library needs to implement the same logic to make sure that the app does not allow the JWT to expire.
The text was updated successfully, but these errors were encountered: