SessionProvider or equivalent for SvelteKit #8784
pauldemarco
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
onSessionChanged
would be nice.Non-Goals
Background
Auth.js should provide a reactive session, much like the SessionProvider in next-auth/react:
https://github.com/nextauthjs/next-auth/blob/main/packages/next-auth/src/react/index.tsx#L340
Proposal
In a similar fashion, utilizing local storage within the SessionProvider to keep different tabs in sync.
I'm sure how to integrate with a SvelteKit project, perhaps
useContext
? Or just some global functiononSessionChanged
we can subscribe to?Beta Was this translation helpful? Give feedback.
All reactions