OAuth
Get started with social authentication.
Supabase supports almost 20 (!) different OAuth providers. They can be easily configured and enabled in the kit without any additional configuration needed.
Everything configured!
TurboStarter provides you with all the configuration required to handle OAuth providers responses from your app:
- redirects
- middleware
- confirmation API routes
You just need to configure one of the below providers on their side and pass correct credentials to Supabase.
IMPORTANT: The configuration is done on Supabase's side - not on TurboStarter's side.
Third Party providers need to be configured, managed and enabled fully on the provider's and Supabase's side. TurboStarter does not need any configuration (beyond setting the provider to be displayed in the UI).
Please read Supabase's documentation on how to set up third-party providers.
For local development, also check out Supabase's documentation on how to set up OAuth providers locally.
Local development secrets
For local development, you would need to set the environment variables for OAuth providers in packages/db/.env.local
- this is the place from where the local Supabase instance reads the environment variables.
After changing values in .env.local
, you need to restart Docker containers using pnpm db:stop
and pnpm db:start
to apply the changes.
Remember to add redirect URL
As for the web app, we need to define some redirect url where the user is redirected after authentication. For mobile app, we don't have a classic URL, but an app scheme, which we're using to deep link user to specified screen in the app.
To find your app scheme, take a look at apps/mobile/app.config.ts
file:
Then, for local development, ensure it's added to additional_redirect_urls
array in packages/db/supabase/config.toml
file:
For the cloud instance, make sure to add in your project dashboard under Authentication -> URL Configuration -> Redirect URLs.
Also, we included some native integrations (Apple for iOS and Google for Android) to make the sign-in process smoother and faster for the user.
Last updated on