Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pr adds the ability to try to refresh the refresh token one last time before sending the user to the "log out" view.
This scenario only happens in rare cases where the browser sits in the background and the native browser throttling could happen.
Please read https://developer.chrome.com/blog/timer-throttling-in-chrome-88/ for a more detailed explanation.
The problematic part is
oidc-auth-ts
which uses an internal timer to organize all tasks, the timer then usessetInterval
which gets throttled. If this happens the timer gets out of sync and theaccessTokenExpired
event gets emitted.In those cases the code now tries to refresh the token one more time before it sends the user to the error view. Please note that the oidc server needs to be setup correct and the access token lifespan should't be too short.
Related Issue
Motivation and Context
be able to keep the web intact if it runs in the background.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: