Many users prefer signing in with an existing account rather than creating another password.
Supabase Auth supports OAuth providers such as Google and GitHub.
The Basic Flow
The authentication flow looks like:
User
↓
Your Application
↓
OAuth Provider
↓
Authentication
↓
Your Application
The provider verifies the user's identity.
Supabase then manages the resulting authentication session.
Configure the Provider
Before using OAuth, configure the provider and callback settings.
Your application needs the correct redirect URL for development and production.
Development vs Production
A common deployment mistake is configuring only the local URL.
For example:
localhost → Development
yourdomain.com → Production
Both environments may need appropriate redirect configuration.
User Profiles
After authentication, your application can maintain additional profile information in PostgreSQL.
For example:
user_id
display_name
avatar
company
Multiple Providers
An application can support more than one provider.
For example:
Continue with Google
Continue with GitHub
Users can then choose their preferred method.
Production Testing
Test:
- First login
- Returning login
- Logout
- Redirects
- Invalid callback
- Production domain
Final Thoughts
OAuth can remove friction from the signup process.
With Supabase Auth, applications can connect external identity providers while keeping application-specific data in PostgreSQL.