OIDC redirect callback
GET/api/v1/auth/providers/:provider/callback
Exchanges the authorization code, verifies the ID token, then redirects to app.web_url with auth (or MFA) cookies set. Creates the user on first login if allowed by the provider's domain restrictions.
Request
Responses
- 302
- 400
- 401
- 403
- 404
- 502
Redirect to app.web_url with auth or MFA cookies set
Response Headers
Either full auth cookies (safebucket_access_token + safebucket_refresh_token) if no MFA step-up is needed, or a single restricted safebucket_mfa_token cookie if mfa_required: true is returned in the body.
State or nonce cookie missing/mismatched, token exchange failed, or ID token missing (OIDC_STATE_NOT_FOUND, OIDC_STATE_MISMATCH, OIDC_NONCE_NOT_FOUND, OIDC_NONCE_MISMATCH, OAUTH_EXCHANGE_FAILED, ID_TOKEN_MISSING)
ID token verification failed (ID_TOKEN_VERIFY_FAILED)
Email domain not allowed for this provider (FORBIDDEN)
Provider not configured or not of type oidc (PROVIDER_NOT_FOUND)
Failed to fetch userinfo from the OIDC provider (OAUTH_USERINFO_FAILED)