Supabase "Unsupported provider: provider is not enabled" on Google or GitHub sign-in

By AI App Medic · Updated · Supabase · Auth · OAuth · Lovable

A user clicks "Sign in with Google" (or GitHub, Apple, Microsoft) and instead of the account picker the browser shows a page of raw JSON on your Supabase address:

{"code":400,"error_code":"validation_failed","msg":"Unsupported provider: provider is not enabled"}

The address bar shows something like https://abcdwxyzqrst.supabase.co/auth/v1/authorize?provider=google&redirect_to=.... Supabase Auth refused to start the login, so Google was never involved. The fix is in the Supabase project settings, not in your code.

This comes up a lot in apps built with Lovable, Bolt, Cursor and v0. The AI assistant adds a Google button and a call to signInWithOAuth() in seconds, but it cannot switch the provider on for you, and it rarely says so.

Why your code never sees the error

supabase.auth.signInWithOAuth({ provider: 'google' }) does not talk to the server first. It builds the /auth/v1/authorize URL and sends the browser there. The 400 is returned to that page load, so a try/catch around the call catches nothing and the returned error is null. You have to fix the settings the server reads.

Step 1: read the end of the message

Supabase loads the provider configuration when the login starts. If that fails, it answers with "Unsupported provider:" followed by the reason. The reason tells you which fix you need:

Step 2: make sure you are changing the right project

If you are sure you already enabled Google, this is almost always the reason. The part of the error page address before .supabase.co is the project ref of the project that answered. Your dashboard address contains the ref of the project you are editing, right after /project/. If they differ, you are turning things on in one project while the app uses another.

Common ways that happens:

You can check what a project has enabled without logging in. The settings endpoint lists every provider as true or false:

curl -s "https://<project-ref>.supabase.co/auth/v1/settings" \
  -H "apikey: <anon or publishable key>"

Look for "external": { ... "google": false ... }. Note that true only means the switch is on. It does not prove the secret is filled in, which is the trap in Step 4.

Step 3: create the OAuth client and enable the provider

In Supabase, open Authentication, Sign In / Providers and click Google. Copy the Callback URL shown in the panel. It looks like https://<project-ref>.supabase.co/auth/v1/callback, or your custom auth domain if you set one up.

In Google Cloud, go to Google Auth Platform, Clients (older consoles: APIs and Services, Credentials) and create an OAuth client ID of type Web application:

Copy the client ID and the client secret. Google shows the full secret only once, when you create it. If you lose it, add a new secret on the same client.

Back in Supabase, turn on Enable Sign in with Google, paste the client ID into Client IDs and the secret into Client Secret (for OAuth), and save. If the Google consent screen is still in Testing status, only the test users you listed there can sign in, so add your own address or publish the app.

For GitHub the idea is the same: create an OAuth App under GitHub Settings, Developer settings, OAuth Apps, set the authorization callback URL to the same Supabase callback, generate a client secret, and paste both into the GitHub provider in Supabase.

Step 4: the "missing OAuth secret" trap

The Google panel lets you save with a client ID and no secret, because Google One Tap and native Android or iOS sign-in send an ID token and do not need one. The web redirect flow that signInWithOAuth() starts does need it. The result is a project whose settings endpoint says "google": true while every web login fails with:

{"code":400,"error_code":"validation_failed","msg":"Unsupported provider: missing OAuth secret"}

Paste the secret of the Web application client (not an Android or iOS client, which have none) and save. If you listed several client IDs separated by commas, the secret has to belong to the web client.

Step 5: use the provider name Supabase expects

The value you pass as provider must be one of Supabase's own names. Most are obvious, a few are not:

supabase.auth.signInWithOAuth({ provider: 'google' });
supabase.auth.signInWithOAuth({ provider: 'github' });
supabase.auth.signInWithOAuth({ provider: 'azure' });          // Microsoft, not 'microsoft'
supabase.auth.signInWithOAuth({ provider: 'linkedin_oidc' });  // LinkedIn, not 'linkedin'

A wrong name gives Unsupported provider: Provider microsoft could not be found. TypeScript usually catches it, but AI-generated code often casts the value to any or builds it from a string.

Step 6: local CLI and self-hosted Supabase

The local stack started with supabase start ignores the hosted dashboard and reads supabase/config.toml. Enable the provider there, keep the secret out of the file, and restart:

[auth.external.google]
enabled = true
client_id = "env(SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID)"
secret = "env(SUPABASE_AUTH_EXTERNAL_GOOGLE_SECRET)"
redirect_uri = ""
skip_nonce_check = false
supabase stop && supabase start

For local development, add http://127.0.0.1:54321/auth/v1/callback to the Google client's redirect URIs as well, and put the two values in a .env file the CLI can read, not in a committed file.

On self-hosted Supabase (Docker), the auth service reads environment variables instead: GOTRUE_EXTERNAL_GOOGLE_ENABLED=true, GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID, GOTRUE_EXTERNAL_GOOGLE_SECRET and GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI set to your public callback URL. Missing the last one is what produces missing redirect URI. Restart the auth container after changing them.

Step 7: test without your app

Paste this into a browser, with your project ref:

https://<project-ref>.supabase.co/auth/v1/authorize?provider=google

Any Google page, even a Google error page, means the Supabase side is done. The JSON means it is not, and its last words say why. Then test the real button in a private window.

The errors that come next

Once Supabase hands the user to Google, two other problems are common:

Users who first signed up with Google have no password, so if they later try the email and password form they get Invalid login credentials. Show the Google button next to the password form so they can find their way back.

Prevention

FAQ

What does Unsupported provider: provider is not enabled mean?

Supabase Auth received a request to start an OAuth login, for example with Google, but that provider is switched off in the project that received it. It answers with HTTP 400, error_code validation_failed, before sending the user to Google.

I enabled Google in Supabase. Why do I still get the error?

Usually the app talks to a different Supabase project than the one you changed, such as a staging copy, a remixed project or the local CLI stack. Compare the project ref in the error page address with the ref in your dashboard URL.

What does Unsupported provider: missing OAuth secret mean?

Google is switched on but the Client Secret field is empty. The dashboard lets you save that, because native and One Tap sign-in do not need a secret, but the web redirect flow started by signInWithOAuth does. Paste the secret of your Web application client and save.

Why does my try/catch not catch this error?

signInWithOAuth only builds the authorize URL and redirects the browser to it. The error page is served by Supabase in that new page load, so your code never sees it. Check the provider settings rather than adding error handling.

What is the provider name for Microsoft or LinkedIn?

Microsoft accounts use azure, and LinkedIn uses linkedin_oidc. Using microsoft or linkedin gives Unsupported provider: Provider microsoft could not be found.

Related guides