Open whitegate

Sign in with OpenID Connect

A product signs people in with the authorization code flow. The owner first registers the product in whitegate: its id becomes the client_id, and the owner supplies the exact redirect URIs and issues a client secret.

The issuer is https://whitegate.exocriador.dev. Discovery is at /.well-known/openid-configuration.

Endpoints#

PurposeAddress
Authorizationhttps://whitegate.exocriador.dev/oidc/authorize
Tokenhttps://whitegate.exocriador.dev/oidc/token
Userinfohttps://whitegate.exocriador.dev/oidc/userinfo
Signing keyshttps://whitegate.exocriador.dev/oidc/jwks

Supported: response type code, grants authorization_code and refresh_token, PKCE method S256, ID tokens signed with EdDSA, client authentication client_secret_basic or client_secret_post. Scopes: openid, email, profile, offline_access.

The flow#

  1. Send the browser to /oidc/authorize with response_type=code, client_id, redirect_uri, scope (including openid), state, nonce, code_challenge and code_challenge_method=S256.
  2. whitegate signs the person in if needed and checks the product's door. A person who is refused sees a reason page instead of returning to you.
  3. The browser comes back to your redirect_uri with code, state and iss. A code lives 60 seconds and works once.
  4. Your server posts to /oidc/token with grant_type=authorization_code, code, redirect_uri and code_verifier, authenticating with the client secret.
  5. The response carries access_token, id_token, expires_in (600 seconds) and, when offline_access was requested, a refresh_token.

An unknown client or an unregistered redirect_uri is never redirected to. A product can be set to require PKCE and a nonce; such a client is refused without them. New products require them by default.

Claims#

The ID token is audience-bound to your client and carries:

ClaimMeaning
subThe person's stable id
email, email_verifiedThe address and whether it is confirmed
nameThe display name, or the part of the address before the @
leveladmin or member in your product
nonceEchoed when you sent one

/oidc/userinfo accepts the access token as Authorization: Bearer and returns sub, email, email_verified and name. It answers 401 once the person no longer has access.

Verify ID tokens against the keys in /oidc/jwks; cache them for about ten minutes and re-read when you meet an unknown kid.

Refresh tokens#

A refresh token lives 30 days and is single use: each refresh returns a new one. Presenting a used token revokes the person's refresh tokens for your product. A refresh fails when the person has lost access.

Back-channel logout#

When a person is refused, blocked, loses a role or has sessions revoked, whitegate posts a logout token to https://<your origin>/api/account/exo/logout, where the origin is the one registered for the product. The token is a JWT of type logout+jwt with sub, iss, aud and the back-channel logout event. End that person's sessions and answer 2xx. Delivery is retried for up to 24 hours.

Errors#

The token endpoint answers invalid_client (401), invalid_grant and unsupported_grant_type. The authorization endpoint reports invalid_request, invalid_scope and unsupported_response_type on the redirect.