đź‘‹
Follow this guide to get Supabase auth and database setup in your Divjoy codebase
đź‘€
Click the ▶︎ icon next to any step to see a detailed walkthrough with screenshots.
Basic Setup
Signup for an account at supabase.com or login to your existing account. Create a new Supabase project Copy your new project's Public Key, Secret Key, and URL into your codebase .env
file. Authentication
Go to Authentication settings and fill in your Site URL and Redirect URLs. The value for both should be your local development URL (generally http://localhost:3000
). Ensure Email Auth is enabled and that email confirmation settings are to your liking. [optional] Enable social auth providers. This will involve creating apps with each provider and adding your credentials. You can also come back to this step later, as it's not required to get your web app up and running. Database
Go the the SQL editor, click the "New query" button, paste in the contents of your codebase schema.sql
file and click "RUN". This will create your database tables, security policies, and triggers. You can now view your tables and data in the Supabase Table Editor. As you build your app you'll likely want to come back to the table editor to add tables, columns, manually insert rows, etc. đź‘Ź
Congrats! Supabase is all setup in your codebase. If you're already running your dev command you'll want to make sure to stop it (Ctrl + C) and re-run it so that it reads your updated .env
file.
FAQ
Why does it show a loading indicator forever after signing up? Why am I seeing errors when I try to run my app? Why am I getting a “request disallowed” error when signing up in my app? Why don't I see all the social auth providers when viewing my app?