Skip to content
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

Refactor AuthenticationContainer to sync tokens between tabs #4529

Closed
tristan-orourke opened this issue Oct 31, 2022 · 1 comment
Closed
Labels
debt Refactor or improve existing code.

Comments

@tristan-orourke
Copy link
Member

tristan-orourke commented Oct 31, 2022

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.

@tristan-orourke tristan-orourke added the debt Refactor or improve existing code. label Oct 31, 2022
@mnigh mnigh changed the title Refactor AuthenticationContainer to sync tokens between tabs. Refactor AuthenticationContainer to sync tokens between tabs Aug 8, 2023
@vd1992 vd1992 mentioned this issue Nov 30, 2023
6 tasks
@vd1992
Copy link
Contributor

vd1992 commented Dec 1, 2023

Appears not needed as of #8618

@vd1992 vd1992 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Refactor or improve existing code.
Projects
None yet
Development

No branches or pull requests

2 participants