Use SessionStorage to refresh every hour on OAuth issues #798
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.
Resolves: #770
Description
Use sessionStorage to hold onto a timestamp. If 1h has passed since the last timestamp, and we run into an OAuth issue (because of token expiration) we should auto refresh.
Note: This value is not persisted past the life of the tab. So it will always refresh once on startup if it runs into the problem, no matter the time since the last time it did.
How Has This Been Tested?
I caused an error in the OAuth code to cause the error -- this is not really testable outside of an OAuth expiration (which cannot happen locally in dev mode). Which seems to happen 24-48h after your tab has been left on the dashboard. This hasn't been fully verified, but it appears to be the best understanding we have right now.
Merge criteria: