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:
provider is not enabled: the provider switch is off in the project that answered. Steps 2 and 3.missing OAuth secret: the switch is on, but the Client Secret field is empty. Step 4.missing OAuth client ID: the switch is on without a client ID. Step 3.Provider microsoft could not be found(or another name): the code asks for a provider name Supabase does not know. Step 5.missing redirect URI: only seen on self-hosted Supabase. Step 6.
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:
- Staging and production are separate projects. Providers, keys and redirect URLs do not copy across. Each project needs its own setup.
- A remixed or duplicated app points at a new, empty project, or still at the old one.
- The local CLI stack. If the address is
http://127.0.0.1:54321/auth/v1/authorize, the dashboard does not apply at all. See Step 6. - Lovable Cloud. If your Lovable app uses Lovable's built-in backend rather than a Supabase project you own, there is no Supabase dashboard to change. Google sign-in is configured in the Lovable Cloud user and auth settings inside the editor.
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:
- Authorized JavaScript origins: your app's address, for example
https://yourapp.com. - Authorized redirect URIs: the Supabase callback URL you copied, exactly, with no trailing slash.
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:
- Google shows
Error 400: redirect_uri_mismatch. The Supabase callback is missing from the client's redirect URIs, or differs by a slash or the scheme. See Google redirect_uri_mismatch with Supabase. - The login works but the user lands on
localhost:3000or the wrong domain. That is the Site URL and Redirect URLs list in Supabase. See Supabase auth redirects to localhost.
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
- When an AI assistant adds a social login button, treat it as half the job. The provider still has to be set up in every Supabase project the app uses.
- Keep a short auth checklist per environment: provider enabled, web client ID and secret saved, callback URL in the provider console, Site URL and Redirect URLs set.
- Only show buttons for providers that are enabled. You can read
/auth/v1/settingsat build time and hide the rest. - Store client secrets in the dashboard or in environment variables, never in
config.tomlor source files.
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
- Google Error 400: redirect_uri_mismatch with Supabase: the exact URI to add
- Supabase login redirects to localhost (or the preview URL) after deploy: how to fix it
- Supabase "AuthApiError: Invalid login credentials" when the user and password look right
- Supabase "AuthApiError: User not allowed" on auth.admin calls: the cause and a safe fix
- Supabase auth email not sending in a Lovable app: the SMTP setup that actually works