OAuth2 Redirect URI
The URL where the authorization server redirects users after authentication, carrying authorization codes or tokens back to the client application.
OAuth2 Redirect URI (callback URL) is the endpoint where the authorization server redirects users after authentication. It carries the authorization code or tokens back to the client application. Proper validation is critical for security.
How It Works
// 1. Client sends redirect_uri in authorization request
GET /authorize?
client_id=app123&
redirect_uri=https://app.com/callback&
...
// 2. After auth, server redirects to this URI with code
HTTP/1.1 302 Found
Location: https://app.com/callback?code=ABC123&state=XYZ
Secure Validation
- Exact string matching (not prefix or regex)
- Pre-register allowed redirect URIs
- No wildcards in production
- Reject URIs with unusual characters
- Check for path traversal attempts