sveltekit-supabase-auth

Sveltekit Supabase Auth

Svelte + Supabase Auth Demo

Adapted from: https://supabase.com/docs/guides/with-svelte for https://kit.svelte.dev

since svelte-kit uses vite we need to prefix the environment variables with VITE_ (locally in .env and globally in your deployment environment [i.e. Netlify])

Set up the Supabase project as described in https://supabase.com/docs/guides/with-svelte (also see utils/db/create-auth-table.sql) and add the following to your local (.gitignore-ed) .env file:

VITE_SVELTE_APP_SUPABASE_URL=<your-project-url>
VITE_SVELTE_APP_SUPABASE_ANON_KEY=<your-public-api-key>

Note: The build directory has been set to build to comply with the Netlify default.

Top categories

Loading Svelte Themes