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.
QUICK FIX · $49 · THIS ERROR ONLY
Get this exact error fixed — $49 Quick FixFixed within scope, or we keep working until it is · Read-only access Not sure it's this error? $149 diagnosis
- 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.
One error, one root cause, fixed in your app. If it turns out bigger, we tell you before doing more, and your $49 is credited toward the fix, diagnosis or Launch Path if you book within 14 days. Fixing three? The 3-Error Pack is $119.
Bigger job: More than one auth or data issue? Auth & database security fix, from $400.
Built with Lovable, Bolt, Replit, Cursor or v0? See rescue by platform and the security checklist.