Initiate OIDC SSO flow (POST variant)
POST /api/auth/sso/oidc/initiate
Accepts tenant_id and redirect_uri in a JSON request body and returns auth_url, state and binding as JSON. Both values are validated; tenant_id must be a positive integer and redirect_uri a URL of at most 2048 characters. The enabled OIDC configuration must exist. This route is unauthenticated and limited to 20 requests per minute per IP.
This operation needs no authentication.
Request body
application/json object
redirect_uristring (uri) requiredLength: at most 2048 characterstenant_idinteger requiredRange: at least 1
Generated sample
{
"redirect_uri": "https://example.com",
"tenant_id": 1
}Responses
200 Authorization URL, single-use state and client-held binding returned.
application/json object
auth_urlstring (uri) requiredbindingstring requiredOne-time client-held secret (64 hex characters). Keep it in the client that started the sign-in and send it to the OIDC token endpoint together with the code and state.
Length: 64 to 64 charactersstatestring required
Generated sample
{
"auth_url": "https://example.com",
"binding": "string",
"state": "string"
}422 OIDC is not configured or the request is invalid.
application/json object
errorstring required
429 Route rate limit exceeded.
Response headers
Retry-Afterstring headerX-RateLimit-Scopestring header
application/json object
errorobject requiredcodestring requiredValue:"too_many_attempts"scopestring requiredValue:"route"messagestring requiredretry_after_sinteger requiredRange: at least 1
text/html string
502 OIDC initiation failed.
application/json object
errorstring requiredValue:"oidc_initiate_failed"detailstring requiredrefstring required