Error library

OAuth redirect_uri_mismatch (Google sign-in)

Google rejects the sign-in (users often see it as "Error 400: redirect_uri_mismatch") because the redirect_uri your app sent is not an exact match for an authorized redirect URI on that OAuth client. Add the exact URI (scheme, host, port, path, trailing slash) in Google Cloud Console, or fix the app to send the registered one.

Cause: The app moved to a new domain (or Supabase/Clerk callback URL) that was never registered on the OAuth client.

How to fix it

  1. Copy the redirect_uri value shown in the error details.
  2. In Google Cloud Console > Credentials, open the same OAuth client ID your app uses.
  3. Add the exact URI to Authorized redirect URIs (and the origin to Authorized JavaScript origins if needed).
  4. If using Supabase or Clerk, register the provider's callback URL, not your page URL.

Example

Illustrative example, not from a customer project.

  Authorized redirect URIs
    http://localhost:3000/auth/callback
+   https://app.example.com/auth/callback

FAQ

I added it but still see the error.

Check you edited the same client ID the app uses, and that http/https and trailing slashes match exactly. Changes can take a few minutes.

Does localhost need HTTPS?

No; Google allows http for localhost, but production URIs must use https.

Get a $149 diagnosis See pricing Still exposed or still logged out? Get an auth & database security fix (Supabase, Firebase).

$149Get a $149 diagnosis