OAuth authorize endpoint (Authorization Code + PKCE)
Initiates the Authorization Code + PKCE flow: 1. Validates client_id exists and is enabled 2. Validates redirect_uri is in whitelist (exact match only) 3. Validates PKCE code_challenge_method (must be S256 if provided) 4. Stores state token with PKCE parameters in Redis (5 minutes TTL) 5. Redirects to the OAuth consent page with OAuth parameters # Arguments * `realm_id` - Realm identifier * `params` - OAuth query parameters (client_id, redirect_uri, state, response_type, code_challenge, code_challenge_method) # Returns * 302 redirect to the OAuth consent page with OAuth parameters # Errors * 400 - Invalid parameters (missing client_id, redirect_uri, state, or code_challenge) * 400 - Invalid response_type (must be "code") * 400 - Unsupported code_challenge_method (must be "S256") * 404 - Client not found * 403 - Client app is disabled * 400 - Redirect URI not in whitelist
Initiates the Authorization Code + PKCE flow:
- Validates client_id exists and is enabled
- Validates redirect_uri is in whitelist (exact match only)
- Validates PKCE code_challenge_method (must be S256 if provided)
- Stores state token with PKCE parameters in Redis (5 minutes TTL)
- Redirects to the OAuth consent page with OAuth parameters
Arguments
realm_id- Realm identifierparams- OAuth query parameters (client_id, redirect_uri, state, response_type, code_challenge, code_challenge_method)
Returns
- 302 redirect to the OAuth consent page with OAuth parameters
Errors
- 400 - Invalid parameters (missing client_id, redirect_uri, state, or code_challenge)
- 400 - Invalid response_type (must be "code")
- 400 - Unsupported code_challenge_method (must be "S256")
- 404 - Client not found
- 403 - Client app is disabled
- 400 - Redirect URI not in whitelist
realmId*stringRealm ID
client_id*stringOAuth Client ID
redirect_uri*stringRedirect URI (must be in whitelist, exact match)
state*stringState token (CSRF protection)
response_type*stringResponse type (must be 'code')
code_challenge*stringPKCE code challenge (SHA256 + Base64url)
code_challenge_method?stringPKCE method (must be 'S256' if provided, defaults to S256)
scope?stringSpace-delimited scope tokens; presence of the literal 'openid' token triggers id_token issuance, other tokens are not interpreted. The built-in MCP client accepts only the four mcp:*:read scopes (absent defaults to mcp:profile:read)
nonce?stringOIDC nonce, echoed into the id_token nonce claim when openid is requested
resource?stringRFC 8707 resource indicator; required on (and only valid for) the built-in MCP client, where it must equal the realm's canonical {origin}/mcp/{realmId} URI
Redirect to /{realmId}/auth/consent with OAuth parameters
curl -X GET 'https://example.com/api/oauth/string/authorize?client_id=string&redirect_uri=string&state=string&response_type=string&code_challenge=string'