OAuth 2.0 Error: `redirect_uri_mismatch` (400 Bad Request)

Callback URL sent by app differs in scheme, trailing slash, port, or host from registered URI.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: OAuth 2.0 Error Platform: Security
Common Root Causes:
  • Callback URL sent by app differs in scheme, trailing slash, port, or host from registered URI.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Register the exact canonical HTTPS callback URI and ensure reverse proxy sets `X-Forwarded-Proto: https`.
Safe Diagnostic Command:
Compare exact `redirect_uri` query param with IdP console
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Callback URL sent by app differs in scheme, trailing slash, port, or host from registered URI. Recommended diagnostic: `Compare exact `redirect_uri` query param with IdP console`. Remediation: Register the exact canonical HTTPS callback URI and ensure reverse proxy sets `X-Forwarded-Proto: https`.

Worked Examples

  • Run `Compare exact `redirect_uri` query param with IdP console` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-oauth-redirect-uri-mismatch · Independently verified: 2026-11-25

Related Resources