Auth API reference

Auth API · Consumer-Oauth-Sign-In

get/{app_slug}/v1/auth/oauth/{provider}/callback

Provider callback (Google / GitHub redirect with `code` on the query string). Exchanges code, mints Auth tokens, stashes them behind a single-use code, 303s to `<return_to>?heimdall_code=…`.

Path parameters

app_slug*string

Slug of the app.

provider*enum (3)

The sign-in provider: `google`, `github` or `apple`.

Query parameters

errorstring
codestring
state*string

Response · 303

Redirect to `return_to`. Carries `?heimdall_code=<code>` on success and `?heimdall_error=<code>` on a handled failure. When the app runs `auth_config.mfa: "required"` and the account holds no enabled factor, NO session is minted and the redirect carries `?heimdall_code=<code>&heimdall_mfa_enrollment_required=1`; redeeming that code at `POST /{app_slug}/v1/auth/oauth/exchange` returns `{mfa_enrollment_required, mfa_token, expires_at}` instead of tokens, and the page must then complete `POST /{app_slug}/v1/auth/mfa/enroll` and `/auth/mfa/enroll/verify` with `mfa_token` to obtain tokens. No credential is ever put on the URL.