Authentication Setup
PacBoiler uses Supabase Auth for secure user management. This guide covers setting up Google OAuth, GitHub OAuth, and Magic Links.
1. Create Supabase Project
- Go to database.new and create a new project.
- Once created, go to Project Settings > API.
- Copy the
Project URLandanon publickey. - Paste them into your
.env.localfile:
NEXT_PUBLIC_SUPABASE_URL=your_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key2. Configure Auth Providers
Go to Authentication > Providers in your Supabase dashboard.
Email / Magic Link
- Enable Email provider.
- Ensure Enable Email Confirmations is ON (recommended for production) or OFF (for faster dev).
Google OAuth
- Go to the Google Cloud Console.
- Create a new project.
- Configure the OAuth Consent Screen (External).
- Go to Credentials and create an OAuth Client ID (Web Application).
- Add the following Authorized Redirect URI:
https://<your-project-ref>.supabase.co/auth/v1/callback - Copy the Client ID and Client Secret.
- Paste them into the Supabase Google Provider settings.
GitHub OAuth
- Go to GitHub Developer Settings.
- Create a New OAuth App.
- Set the Authorization callback URL to:
https://<your-project-ref>.supabase.co/auth/v1/callback - Copy the Client ID and generate a Client Secret.
- Paste them into the Supabase GitHub Provider settings.
3. URL Configuration
For authentication to work correctly locally and in production, you need to configure the redirect URLs in Supabase.
- Go to Authentication > URL Configuration.
- Set Site URL to your production URL (e.g.,
https://myapp.com). - Add
http://localhost:3000/**to Redirect URLs.
Next Steps
Now that Auth is configured, let's set up the Database tables.