Supabase Authentication Setup
Supabase is an open-source Firebase alternative that provides authentication, database, and storage services. This guide shows you how to integrate Supabase authentication with your Zudoku documentation site.
Prerequisites
You'll need a Supabase project. If you don't have one, create a free Supabase project to get started.
Setup Steps
- 
Configure Authentication Provider In your Supabase Dashboard: - Navigate to Authentication → Providers
- Enable your preferred authentication provider (GitHub, Google, Azure, etc.)
- Configure the provider settings:
- Redirect URL: https://your-project.supabase.co/auth/v1/callback
- Copy any required credentials (Client ID, Client Secret) from the provider
 
- Redirect URL: 
 
- 
Get Your Project Credentials From your Supabase project dashboard: - Go to Settings → Data API
- Copy your Project URL (looks like https://your-project.supabase.co)
- Go to Settings → API Keys
- Copy your anon public API key
 
- 
Configure Zudoku Add the Supabase configuration to your Zudoku configuration file: Code
- 
Install Supabase Dependencies Add @supabase/supabase-jsto your project dependencies:Code
Supported Providers
Supabase supports numerous authentication providers. Use any of these values for the provider
field:
- apple- Sign in with Apple
- azure- Microsoft Azure AD
- bitbucket- Bitbucket
- discord- Discord
- facebook- Facebook
- figma- Figma
- github- GitHub
- gitlab- GitLab
- google- Google
- kakao- Kakao
- keycloak- Keycloak
- linkedin/- linkedin_oidc- LinkedIn
- notion- Notion
- slack/- slack_oidc- Slack
- spotify- Spotify
- twitch- Twitch
- twitter- Twitter/X
- workos- WorkOS
- zoom- Zoom
- fly- Fly.io
Email does not need to be specified as a provider because it is enabled by default in Supabase.
Configuration Options
Redirect Configuration
Customize redirect behavior after authentication events:
Code
Advanced Configuration
Custom User Metadata
Store additional user information in Supabase:
- Create a profilestable in your Supabase database
- Set up a trigger to create profile records on user signup
- Access this data in your application as needed
Troubleshooting
Common Issues
- 
Invalid API Key: Ensure you're using the anon publickey, not theservice_rolekey.
- 
Provider Not Working: Verify the provider is enabled in your Supabase dashboard and properly configured with the correct redirect URLs. 
- 
Redirect URLs: For local development, update your redirect URLs in both Supabase and the OAuth provider to include http://localhost:3000.
- 
CORS Errors: Check that your site's domain is properly configured in Supabase's allowed URLs. 
- 
Authentication Not Working: Make sure you have installed @supabase/supabase-jsto your project.
Next Steps
- Explore Supabase Auth documentation for advanced features
- Learn about protecting routes in your documentation