This template repository can be used as a skeleton for developing a web app that has a user authentication and profile management.
- SvelteKit
- Supabase (Auth, Database) - Google SSO added
- TailwindCSS + DaisyUI
- Login with Google
- Backend database (Supabase) to store users and their additional information
- Manage basic profile information
- Create a file named
.envin the root directory of the project. Put the below content into the filePUBLIC_SUPABASE_URL= PUBLIC_SUPABASE_ANON_KEY= - Create a new Supabase project
- Navigate to the Project Settings page in Supabase.
- Select the API settings page.
- Navigate to Project URL section and copy the
URL. - Paste it into the
.envfile in front of thePUBLIC_SUPABASE_URLkey. It should look like this.PUBLIC_SUPABASE_URL=https://<example>.supabase.co - Navigate to Project API Keys section and copy the
anonpublickey. - Paste it into the
.envfile in front of thePUBLIC_SUPABASE_URLkey. It should look like this.PUBLIC_SUPABASE_ANON_KEY=<anon-key> - Navigate to the
SQL Editorsection and select theUser Management Starter SQLsnippet - Run the snippet and make sure a table called
profilesappear in theTable Editorsection - Go to
URL Configurationsection - Fill in the
Site URLto be the URL of the running svelte application (for eg: http://localhost:5173) - Add
localhost:5173andlocalhostasRedirect URLs - Open a Command Line/Terminal and navigate into the root directory of the project
- Run
npm installto install the dependencies - Run
npm run dev. And open the link shown in the terminal from the browserhttp://localhost:5173 - You should see a button called
Login with Google. Upon clicking on it and authorizing, you will be redirected back to the app - You should see a form with your avatar image, email, Name, an Update button and a Logout button
- Type something on the name input and click on
Updatebutton. - Finally, verify that the name got updated properly by reloading the page.