-
Notifications
You must be signed in to change notification settings - Fork 68
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: Load new state from session/local storage when available after a silent renew #363
fix: Load new state from session/local storage when available after a silent renew #363
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update some of our documentation based on your changes. You can run |
Would love some help on why those tests are failing |
Ok managed to test locally now and seems to work :) |
Did you manage to get them fixed? The build seems to fail, maybe you can add your fix? :) |
No I don't have a fix for the CI stuff. My local fix was to build the package and then remove the node_modules so when I |
Codecov Report
@@ Coverage Diff @@
## master #363 +/- ##
===========================================
- Coverage 100.00% 96.22% -3.78%
===========================================
Files 1 1
Lines 47 53 +6
Branches 11 11
===========================================
+ Hits 47 51 +4
- Misses 0 2 +2
Continue to review full report at Codecov.
|
Basically just needed to update the tests so that also UserManager.events also is mocked. |
Anything I can help with to help get this merged? |
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.
I don't think the UserManager
is supposed to change, which would mean a React Effect on it wouldn't really make sense to me.
If there is an issue with the underlying oidc-client library not refreshing tokens, then perhaps this would be better as an issue on the repo for that client? That library is what handles the refreshing, as far as I can tell.
|
@Powersource Ah, OK I see now. You're right. The user data state needs to be updated when oidc-client refreshes it. That effect looks fine to me, but perhaps the dependency on In the scenario in which we use this library, our In your scenario, is UserManager changing over time? |
Removed userManager from the dep array now :) |
Looks good to me. /cc @cobraz |
## [1.1.5](v1.1.4...v1.1.5) (2020-12-22) ### Bug Fixes * Load new state from session/local storage when available after a silent renew ([#363](#363)) ([319d0e3](319d0e3))
🎉 This PR is included in version 1.1.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks! |
Fixes #361
...I think. When I edited directly in node_modules (it complained when i npm linked because of duplicate react) it worked but this code is slightly different.