I'm trying to figure out how to deal with this, here's my current plan:
1. Store the current session in a React context. Keep it updated for sign in / sign out via useSession. 2. When I get a 401 back from my server, that probably means the session has expired, call getSession and update the context.
Anyone have a better idea?
(tagging this with Next.js but I think it should apply to all React apps)