Skip to content

OpenID Connect and OAuth

Your project’s issuer is its address, such as https://acme.authn.co.uk, or your custom domain if you have one. OpenID Connect libraries find everything else from the discovery document.

Endpoint Path
Discovery /.well-known/openid-configuration, and /.well-known/oauth-authorization-server (RFC 8414)
Authorization /oauth2/authorize (GET or POST)
Token /oauth2/token
UserInfo /oauth2/userinfo (GET or POST)
Keys (JWKS) /oauth2/jwks
Revocation /oauth2/revoke (RFC 7009)
Introspection /oauth2/introspect (RFC 7662, Paid plan)
End session /oauth2/end_session (RP-Initiated Logout 1.0, GET or POST)
Registration /oauth2/register (RFC 7591, when turned on)
Response types code. Also id_token and id_token token (the implicit flow) for applications that allow it
Response modes query for codes, fragment for the implicit flow, with iss in the response (RFC 9207)
Grants authorization_code, refresh_token, client_credentials, and implicit where allowed
PKCE S256 (required, except confidential applications that send a nonce)
Client authentication client_secret_basic, client_secret_post, private_key_jwt (RS256, PS256, ES256; for applications that registered keys), none (public clients)
ID token signatures RS256 (default), ES256
UserInfo JSON, or a signed JWT (RS256 or ES256) for applications that register userinfo_signed_response_alg
Access tokens JWT (at+jwt, RFC 9068) signed ES256, or opaque
Scopes openid, email, profile, address, offline_access, and your APIs’ scopes
Resource indicators resource (RFC 8707)
Sender-constrained tokens DPoP (RFC 9449), with optional server nonces
Request objects Signed (RS256, PS256 or ES256) by value (request) or by reference (request_uri, registered in advance). Unsigned ones are refused.
Signing keys Rotatable in the portal; a new key is published ten minutes before it signs
  • Standard: client_id, redirect_uri, response_type=code, scope, state, nonce, code_challenge, code_challenge_method=S256.
  • prompt:
    • login signs them in afresh (or confirms it’s them);
    • none never shows a page;
    • consent asks again.
  • max_age: sign in again if the last sign-in is older.
  • login_hint: fills in the email address.
  • id_token_hint: names the user the application expects.
  • ui_locales: the preferred languages for the pages.
  • resource: the API the access token is for.
  • dpop_jkt: bind the code to a DPoP key.
  • request or request_uri: the request as a JWT the application signed. Its parameters are used in preference to the query’s (OpenID Connect Core §6.3.3), and can’t be changed while the person signs in.

The code flow is the right choice for nearly every application. The implicit flow is available for older software that can’t use it, but only for applications that allow it. To allow it, turn on Allow the implicit flow in the application’s token settings, or register the id_token or id_token token response types with the implicit grant type.

With the implicit flow, tokens come back in the URL fragment, never in the query, and a nonce is required. id_token returns just an ID token containing the user’s details, while id_token token also returns an access token, which the ID token’s at_hash matches. No refresh token is issued, and DPoP can’t be used.

OAuth’s security guidance (RFC 9700) advises against the implicit flow, and OAuth 2.1 removes it.

Authorization errors come back to the redirect URI as error and error_description, including invalid_request_object and invalid_request_uri for request objects that don’t check out. The exception is an unknown application or an unregistered redirect URI: then the person sees an error page, and nothing is redirected. Token endpoint errors are JSON, as RFC 6749 describes, with an error of invalid_grant, invalid_client, invalid_request, invalid_dpop_proof or use_dpop_nonce.

For the full list of specifications authN follows, see Standards.