You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivation
Storing the token as a URI param will make it much more manageable and easier to access (React Router / Remix has a hook useSearchParams that can do just that) throughout the app rather than relying on local storage.
Technical Design
When a new session is created, store the ID as a parameter. Retrieving it is as easy as calling a hook within components, and React Router / Remix data loaders already allow for easy access to the URL and params.
Motivation
Storing the token as a URI param will make it much more manageable and easier to access (React Router / Remix has a hook
useSearchParams
that can do just that) throughout the app rather than relying on local storage.Technical Design
When a new session is created, store the ID as a parameter. Retrieving it is as easy as calling a hook within components, and React Router / Remix data loaders already allow for easy access to the URL and params.
Alternatives to Consider
Keep it in local storage
Additional context
Suggested by @tobitege
The text was updated successfully, but these errors were encountered: