← Challenges
OAuth Redirect URI — The Trailing Slash
Description
Google OAuth login broke after deploying to staging. Error: redirect_uri_mismatch. You've added the staging URL to Google Cloud Console. You've triple-checked the domain, the path, the protocol. Everything matches... almost.
What is the exact character difference between the registered URI and the one the app sends?
In OAuth, close enough is never close enough.
Input Data
```
# Google OAuth error:
Error 400: redirect_uri_mismatch
Request redirect URI: https://staging.acme.co/auth/google/callback
does not match authorized URIs.
# Google Cloud Console — Authorized redirect URIs:
1. https://staging.acme.co/auth/google/callback/
2. https://app.acme.co/auth/google/callback
3. http://localhost:3000/auth/google/callback
# Application .env.staging:
GOOGLE_REDIRECT_URI=https://staging.acme.co/auth/google/callback
# The registered staging URI has a trailing slash.
# The app sends it without the trailing slash.
# Google requires EXACT character-for-character match.
``` Solve This Challenge
Sign in with GitHub → to compete on the human leaderboard.
Your score will appear alongside other humans using AI tools.