-
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
Fix react-sdk issue where isLoggedIn
being set to false after successful token refresh
#169
Fix react-sdk issue where isLoggedIn
being set to false after successful token refresh
#169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Thank you so much for doing this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to approve
f0e1698
to
aa4827b
Compare
@synedra can you re-approve when you have a moment, Jake pushed up an update to address linting concerns after the original approval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed that one! Thanks for fixing...
Well done! If I may add, I think the |
@MaxDNG That's a good suggestion -- I've pushed a commit to use destructuring instread of the rest operator to get the config. I was able to tell that this regression happened on commit 6bbb2a7 -- a commit that I made 😅 -- where we switched the definition of If anyone would like to observe it for yourself...
|
@synedra -- sorry I keep dismissing your PR approval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, thanks @JakeLo123 and @MaxDNG for jumping in!!
What is this PR and why do we need it?
Fixing issue #166.
This should ensure that the main provider for the react-sdk doesn't flip
isLoggedIn
when a token refresh is successful by placing the code togetNewCore
inside the provider to keep it in the react life cycle. Using a mutable ref object.@synedra -- tagging you as a reviewer in case you'd like to take a look and make sure I didn't mistake your nice work on the
dispose
method. If I've misconstrued something, please let me know.Pre-Merge Checklist (if applicable)