https://github.com/psegarel/supabase_auth-sveltekit4
# Supabase Auth / SvelteKit 4 Starter ( Typescript )
https://github.com/psegarel/supabase_auth-sveltekit4
authentication supabase sveltekit
Last synced: 4 months ago
JSON representation
# Supabase Auth / SvelteKit 4 Starter ( Typescript )
- Host: GitHub
- URL: https://github.com/psegarel/supabase_auth-sveltekit4
- Owner: psegarel
- Created: 2024-02-15T02:49:52.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-04T17:44:01.000Z (over 2 years ago)
- Last Synced: 2024-03-04T19:22:41.319Z (over 2 years ago)
- Topics: authentication, supabase, sveltekit
- Language: Svelte
- Homepage:
- Size: 70.3 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Supabase Auth / SvelteKit 4 Starter ( Typescript )
Email Auth with PKCE flow for SSR
Email authentication in your server-side rendering (SSR) application using the new @supabase/ssr package.
API endpoint for verifying the token_hash along with the type to exchange token_hash for the user's session, which is set as a cookie for future requests made to Supabase.
### Check the docs...
```bash
https://supabase.com/docs/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr?framework=sveltekit
https://supabase.com/docs/guides/auth/auth-helpers/sveltekit
```
You can also check this article:
[Securing Your SvelteKit App with Supabase Authentication](https://www.patrick-segarel.com/blog/securing-your-sveltekit-app-with-supabase-authentication).
But I worked on this starter because I found many things to be unclear or even wrong, the logic remains though.
Make sure to check how to set up a project with an .env file:
```bash
# Values to be found on your Supabase project dashboard
#https://supabase.com/dashboard/project/[YOUR_PROJECT_ID]/settings/api
PUBLIC_SUPABASE_URL=
PUBLIC_SUPABASE_ANON_KEY=
```
### Update email templates with URL for API endpoint
#### Confirm sign up
```bash
Confirm your signup!
Follow this link to confirm your user:
```
Here the api endpoint is /api/auth/callback, but this is up to you.
#### Reset Password
```bash
Reset Password
Follow this link to reset the password for your user:
```
Check the other email templates, depending on your application needs
### TailwindCSS & Daisy UI
A personal choice...