🗄️Login address mismatch (redirect_uri_mismatch)
Error 400: redirect_uri_mismatch
The "return address" registered in your social login settings (like Google) doesn't match your site's real address, so login was blocked.
🤔 Why does it happen?
- The deployed address (https://your-domain) wasn't added to the login settings
- There's a tiny difference, like http/https, www or no www, or a / at the end
- Only your own computer's address (localhost) is registered
🔧 Try this
- Copy the redirect_uri value shown under "details" on the error screen exactly as it is
- In Google Cloud Console → Credentials, add that value to "Authorized redirect URIs"
- Save, wait a few minutes, then try again
🤖 Ask your AI like this
I get 'Error 400: redirect_uri_mismatch' when logging in with Google. My site address is [URL] and my login library is [the one I'm using]. Please tell me the exact redirect URI to register in the Google console and the environment variable settings I need.
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Database connection failed
Can't reach database server - Table doesn't exist
relation "…" does not exist - Blocked by security rules (RLS), so it won't save
new row violates row-level security policy - Tried to save a value that already exists (duplicate)
duplicate key value violates unique constraint - Login info has expired (JWT)
JWT expired - Login app info is wrong (invalid_client)
Error 401: invalid_client - Google login blocked (app not verified, testing mode)
Access blocked: app has not completed the Google verification process - Prisma isn't ready (prisma generate)
@prisma/client did not initialize yet. Please run "prisma generate"