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
- Copy the
redirect_urivalue shown in the error details. - In Google Cloud Console > Credentials, open the same OAuth client ID your app uses.
- Add the exact URI to Authorized redirect URIs (and the origin to Authorized JavaScript origins if needed).
- 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).
- Fixed, or we keep working free until it is (within the written scope).
- A human reviews every fix before it ships.
- read-only access; fixes arrive as pull requests you merge
- Your $149 diagnosis is credited in full toward any paid job.