© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•2mo ago•
3 replies
Tom

Sveltekit Server side authentication

auth
So following these docs https://supabase.com/docs/guides/auth/server-side/creating-a-client?queryGroups=framework&framework=sveltekit

in the +layout.server.ts file you're returning:
return {
    session,
    user,
    cookies: cookies.getAll(),
  }
return {
    session,
    user,
    cookies: cookies.getAll(),
  }

Which is available in the client with
    let { data } = $props();
    let { data } = $props();


But that exposes your session, access token, supabase keys and everything to the client, am I missing something here?
Creating a Supabase client for SSR | Supabase Docs
Configure your Supabase client to use cookies
Creating a Supabase client for SSR | Supabase Docs
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

SvelteKit Server Side Authentication
SupabaseSSupabase / help-and-questions
5mo ago
SvelteKit and Authentication—server- or client-side?
SupabaseSSupabase / help-and-questions
4y ago
Documentation for full client side authentication with SvelteKit
SupabaseSSupabase / help-and-questions
3y ago
SSR authentication on SvelteKit
SupabaseSSupabase / help-and-questions
3y ago