Supabase Authentication Setup
This guide will walk you through setting up authentication in your Supabase project.
1. Enable Authentication Providers
- Go to your Supabase dashboard
- Navigate to Authentication > Providers
- Enable the following providers:
- Email (for Magic Link)
- Google (for Google Sign-In)
2. Configure Magic Link Authentication
-
In the Email provider settings:
- Enable "Magic Link"
- Configure your site URL
- Set up redirect URLs
- Customize email templates
-
Update your environment variables:
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
3. Set Up Google Authentication
- Follow the Google Sign-In Setup guide
- Add the Google credentials to your environment:
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
4. Test Authentication
- Start your development server
- Test Magic Link authentication
- Test Google Sign-In
- Verify redirect flows