# OAuth2 error: redirect_uri_mismatch

- **ID:** `api/oauth2-invalid-redirect-uri-mismatch`
- **Domain:** api
- **Category:** auth_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The redirect URI in the authorization request does not exactly match one registered in the OAuth client configuration.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| OAuth 2.0 RFC 6749 | active | — | — |
| Google OAuth 2.0 | active | — | — |
| Auth0 v3.0 | active | — | — |

## Workarounds

1. **Copy the exact redirect URI from the OAuth provider's client settings page and paste it into your application code.** (95% success)
   ```
   Copy the exact redirect URI from the OAuth provider's client settings page and paste it into your application code.
   ```
2. **Ensure the redirect URI does not have query parameters or fragments unless explicitly allowed.** (85% success)
   ```
   Ensure the redirect URI does not have query parameters or fragments unless explicitly allowed.
   ```

## Dead Ends

- **** — The mismatch is often a missing trailing slash or different casing; adding one may not fix if the registered URI lacks it. (50% fail)
- **** — Most OAuth providers do not allow wildcards for security reasons. (90% fail)
- **** — The error is deterministic; retrying without fixing the URI pattern will always fail. (100% fail)
