Skip to content
Sign in Create account

Initiate OIDC SSO flow

GET /api/auth/sso/oidc/initiate

Builds an authorization URL from the tenant_id and redirect_uri query parameters. Both 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. Returns auth_url, state and binding as JSON; this route is unauthenticated and limited to 20 requests per minute per IP.

This operation needs no authentication.

Parameters

  • tenant_id integer query required
    Range: at least 1
  • redirect_uri string (uri) query required
    Length: at most 2048 characters

Responses

200 Authorization URL, single-use state and client-held binding returned.

application/json object

  • auth_url string (uri) required
  • binding string required

    One-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 characters
  • state string 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

  • error string required
429 Route rate limit exceeded.

Response headers

  • Retry-After string header
  • X-RateLimit-Scope string header

application/json object

  • error object required
    • code string required
      Value: "too_many_attempts"
    • scope string required
      Value: "route"
    • message string required
    • retry_after_s integer required
      Range: at least 1

text/html string

502 OIDC initiation failed.

application/json object

  • error string required
    Value: "oidc_initiate_failed"
  • detail string required
  • ref string required