Prompt
Google sign in redirect URI issue
Latest observation
Oct 6, 2026
OpenAI APIWeb search: off
A Google Sign-In redirect URI issue usually means the redirect URL registered in Google Cloud Console doesn’t exactly match the one your app is sending during OAuth.
Common causes
-
Redirect URI mismatch
- The URI in your app and the one in Google Console must match exactly
- Watch for:
httpvshttps- trailing slash
/ - different domain/subdomain
- different port number
- path differences
-
Wrong OAuth client type
- Web app, Android, iOS, and Desktop clients all use different settings
- Make sure you created the correct client for your app
-
Missing authorized redirect URI
- In Google Cloud Console:
- Go to APIs & Services → Credentials
- Open your OAuth 2.0 Client ID
- Add the exact redirect URI under Authorized redirect URIs
- In Google Cloud Console:
-
Using localhost incorrectly
- If testing locally, make sure your local callback URL is added, e.g.:
http://localhost:3000/auth/google/callback
localhostand127.0.0.1are treated as different URLs
- If testing locally, make sure your local callback URL is added, e.g.:
-
Incorrect frontend/backend OAuth flow
- If your backend handles the callback, the redirect URI should point to the backend
- If your frontend handles it, the redirect URI should point there instead
Example
If your app sends:
http://localhost:3000/auth/google/callback
Then Google Console must contain:
http://localhost:3000/auth/google/callback
What to check next
- Copy the exact redirect URI from your app logs/network request
- Compare it character by character with Google Console
- Ensure the correct OAuth client is being used
If you want, paste:
- the exact error message, and
- your redirect URI from code + Google Console setting,
and I can pinpoint the mismatch.