-
Notifications
You must be signed in to change notification settings - Fork 4
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
In the React SDK, isLoggedIn set to false on first token expiry and never back to true after a successful refresh [reopened] #166
Comments
The cause might be similar to an issue I had with Do you have the same issue without StrictMode (assuming you are using it)? If not, did you try increasing the That being said, if the refresh does work, it should indeed call the As a matter of fact, as pointed out by @johnmccalla in the other issue, there is clearly a problem with the config being destructured and used as a dependency in the I'll try to open a PR for this. |
@sachams I am also facing the same, application is logging out after performing autorefresh. then it is redirecting to @MaxDNG any thoughts on this i didnt find |
I wasn't fast enough to comment in the other issue (my bad) before it got closed, but I decided to write my own logic, the sdk is just too complex. (Another problem I was having is with the long timeouts on some mobile devices not behaving properly after suspend/sleep resumes.) My own implementation is pretty simple: This makes it very easy for downstream components to understand what's happening and decide what screens to put up. |
There was a prior bug fix for this issue -- see changes for 2.1.1. I installed that version and the bug doesn't produce, so it must've regressed at some point between then and now. In any case, I hope that helps! Between that and this nice PR from @MaxDNG it should clean up some of the issues with timeout/callback syncing. |
Thanks once again @JakeLo123! The latest has been released If anyone sees issues, I can reopen it. |
Hey all thanks for the comments and @JakeLo123 @alex-fusionauth thanks for the fix! I have just tested it and it is looking good so far! 🙌 |
In the React SDK, isLoggedIn set to false on first token expiry and never back to true after a successful refresh [reopened]
Description
This is a reopening of this issue, which still persists after upgrading to
v2.4.2
of the SDK.Affects package
react-sdk
Affects versions
Steps to reproduce
Steps to reproduce the behavior:
Add logging like this into
App
, and set the JWT token expiry to 10sAfter the token expires,
isLoggedIn
gets set tofalse
and never gets set back totrue
.Expected behavior
It is expected that
isLoggedIn
gets set back totrue
when the token is refreshed.Screenshots
isLoggedIn.mp4
Platform
(Please complete the following information)
Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.
The text was updated successfully, but these errors were encountered: