© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
3 replies
Smardrengr

SvelteKit auth helpers and storing session.user in a store—no more prop drilling with session.user

In most code samples I see, the
auth helpers
auth helpers
return
session
session
, as part of
data
data
, e.g.
return {
  games,
  user: session.user
};
return {
  games,
  user: session.user
};

which is then available to
+page.svelte
+page.svelte
via
export let data: PageData;
$: ({ games, user } = data);
export let data: PageData;
$: ({ games, user } = data);

What I would like to do is store
user
user
in a Svelte store so that components that don't live at
+page.svelte
+page.svelte
can access user without prop drilling. Wondering how you people are perhaps doing this?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

auth-helpers-sveltekit best way to access session
SupabaseSSupabase / help-and-questions
4y ago
Using autoRefreshToken with auth-helpers-sveltekit
SupabaseSSupabase / help-and-questions
4y ago
Auth-helpers-sveltekit v2 -- supabaseServerClient?
SupabaseSSupabase / help-and-questions
4y ago
Sveltekit auth helpers URLSearchParams empty
SupabaseSSupabase / help-and-questions
4y ago