Skip to content
Sign in Create account

OIDC callback – exchange code for token

GET /api/auth/sso/oidc/callback

Consumes the code and required 32-character state from the OIDC callback. State is single-use and binds the exchange to the initiation-time PKCE verifier and nonce. On success the controller returns api_token, user_id and email as JSON; it does not redirect. The unauthenticated route is limited to 20 requests per minute per IP.

This operation needs no authentication.

Parameters

  • code string query required
  • state string query required
    Length: 32 to 32 characters

Responses

200 OIDC code exchange succeeded.

application/json object

  • api_token string required
  • email string (email) required
  • user_id integer required

Generated sample

{
  "api_token": "string",
  "email": "user@example.com",
  "user_id": 0
}
422 Missing or invalid state, configuration, code exchange, or tenant account.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

429 Route rate limit exceeded.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

text/html string

502 Error response.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.