Refactor AuthenticationContainer
to sync tokens between tabs
#4529
Labels
debt
Refactor or improve existing code.
AuthenticationContainer
to sync tokens between tabs
#4529
NOTE: if #2572 is already complete, this is likely unnecessary.
Based off concerns described in #4526.
Right now we keep our tokens in a useState hook, occasionally save/load to localStorage, and as of #4526 exclusively use refresh tokens directly from localStorage. We could make this code much simpler, and handle the concerns mentioned in #4526, by writing a custom hook which has an interface like useState but keeps values synced with localStorage (or sessionStorage, for that matter), and keeps them synced between tabs. We can follow the example here, and likely make use of our existing useStorage hook.
The text was updated successfully, but these errors were encountered: