Supabase Google Auth

Adding Google OAuth to your Supabase project allows users to log in using their Google accounts. Follow these steps to set it up:

Adding Google OAuth to Supabase

1. Create a Google Cloud Project

2. Configure the OAuth Consent Screen

  • Inside your Google Cloud Project, search for "OAuth" and select "OAuth Consent Screen."

  • Choose 'External' and fill out the required information.

3. Create Credentials

  • Go to the "Credentials" section.

  • Click "Create Credentials" and choose "OAuth client ID."

  • Select "Web application" and provide the authorized redirect URI from Supabase: https://<your-ref>.supabase.co/auth/v1/callback.

4. Retrieve Client ID and Secret

  • Once the OAuth client ID is created, copy the client ID and secret that Google provides.

5. Insert Credentials into Supabase

  • Go to your Supabase Dashboard, and under "Authentication" > "Settings" > "Providers," find Google.

  • Turn on the Google provider and paste the Client ID and Client Secret.

6. Test the Login

just a quick note as you develop and set up OAuth for your project. While you're still coding and testing locally, it's completely fine to use localhost:3000 as the redirect URI. But remember, once you deploy your project into the wild, you'll need to update this.

Last updated