Test mode: paid plans aren't on sale yet, so nothing is charged. Every plan's limits apply.

← Docs

Apps: which flow

Kind of appRegister asFlow
Server-side web app--confidential, https redirect URIsAuthorization code with PKCE; client secret at the token endpoint (Basic or form)
Single-page apppublic (no --confidential)Authorization code with PKCE (S256); refresh tokens with offline_access
Native or desktop apppublic, a claimed https link (https://app.example/cb, a universal link or app link), a loopback redirect (http://127.0.0.1:PORT/…) or a private-use scheme (com.example.app:/cb)Authorization code with PKCE, in the system browser (RFC 8252). At a loopback or private-use redirect, the person confirms each sign-in (below)
TV, console, command-line toolpublicDevice authorization (RFC 8628)
Service with no user--machineClient credentials (APIs and services)

Rules every app meets

Asking for less, or more

Someone else's app (third-party)

An app the realm's owner doesn't run, such as a partner's integration, registered with --third-party (or "third_party": true). Before it gets anything, the person sees what it asks for and chooses Allow or Deny (Auth0's third-party applications). The realm's own apps don't ask for permissions (but see native apps).

nod client register acme partner-crm --redirect https://crm.partner.example/cb --confidential --third-party

Native apps: each sign-in confirmed

On a phone or a computer, any app can register the same private-use scheme as yours (com.example.app:/cb), or listen on the same loopback port (http://127.0.0.1:7777/cb). Such an app can start a sign-in under your app's client id, with its own PKCE challenge, and catch the code (RFC 8252 §8.6, RFC 6819 §4.2.3). Nod can't tell it from your app, and your being the realm's administrator doesn't help: your app isn't the one that gets the code. So a public app answered at a loopback or private-use redirect has every sign-in confirmed by the person:

To remove the prompt, move the app to a claimed https link. Register https://app.example/cb, prove you own the domain to the operating system (Apple's apple-app-site-association, Android's assetlinks.json), and sign in with that redirect: it goes straight back, as a web app does.

When you accept the risk for one of the realm's own apps, for example a command-line tool on machines you manage, an administrator can turn the prompt off for that app alone. It's off by default, never allowed for a third-party or machine client, and each change is in the security log as client.native_confirmation:

nod client native-confirmation acme acme-cli skip     # ask: back to confirming every sign-in
curl -X PATCH https://auth.example.com/acme/api/v1/clients/acme-cli -H "authorization: Bearer $TOKEN" \
  -H 'content-type: application/json' -d '{"skip_native_confirmation": true}'

Apps that register themselves (RFC 7591)

Where the realm allows it (nod realm set acme --open-registration on, or "open_registration": true), anyone may register an app: discovery lists registration_endpoint, and POST <issuer>/register with the app's metadata answers 201 with its client_id (and client_secret, unless token_endpoint_auth_method is none). It's off by default.

curl -s https://auth.example.com/acme/register -H 'content-type: application/json' \
  -d '{"client_name": "Partner CRM", "redirect_uris": ["https://crm.partner.example/cb"]}'

What a registered app can be is narrow:

Pushed authorization requests (RFC 9126)

An app with a back end can send its authorization request to Nod directly instead of through the browser:

curl -u web:$SECRET $ISSUER/par -d response_type=code -d redirect_uri=https://app.example/cb \
  -d scope=openid -d state=… -d nonce=… -d code_challenge=… -d code_challenge_method=S256
# 201 {"request_uri": "urn:ietf:params:oauth:request_uri:…", "expires_in": 60}

Then send the browser to $ISSUER/authorize?client_id=web&request_uri=<request_uri>.

Signed requests (JAR, RFC 9101)

An app can sign its authorization request, so nothing between it and Nod can change it. Register the app's public keys (a JWKS), then send the parameters as a signed JWT in request:

nod client keys acme web web-jwks.json        # {"keys": [{"kty": "EC", "crv": "P-256", "kid": "k1", …}]}
/authorize?client_id=web&request=eyJhbGciOiJFUzI1NiIsImtpZCI6ImsxIiwidHlwIjoib2F1dGgtYXV0aHotcmVxK2p3dCJ9…

Tokens bound to a key (DPoP, RFC 9449)

A stolen bearer token works for whoever has it. With DPoP, an app's tokens work only with a private key the app holds and never sends. The app sends a DPoP header (a proof signed by its key) with each token request:

FAPI 2.0: requiring PAR and DPoP per app

For apps that move money or other things that matter (FAPI 2.0's Security Profile), Nod can hold an app to the two rules its own settings would otherwise leave optional:

nod client register acme bank --confidential --redirect https://bank.example/cb --require-par --require-dpop
# or: PATCH $ISSUER/api/v1/clients/bank {"require_pushed_authorization_requests": true, "dpop_bound_access_tokens": true}

Devices (RFC 8628)

  1. The device posts client_id and scope to <issuer>/device_authorization, and optionally resource (RFC 8707, one of the realm's APIs: the tokens are then that API's; one the realm doesn't have is invalid_target). It gets back a device_code, a user_code (like BCDF-GHJK), the verification_uri and verification_uri_complete, and an interval. nod login uses this for a person's console token (accounts).
  2. It shows the code and the URI (or a QR code of verification_uri_complete), then polls <issuer>/token with grant_type=urn:ietf:params:oauth:grant-type:device_code.
  3. Meanwhile the person opens the URI, signs in, and sees which app asks for what. Nothing happens until they press Approve.
  4. The poll answers authorization_pending until then. Polling faster than interval gives slow_down and a longer interval. Then come the tokens, once, or access_denied, or expired_token after 10 minutes.

Signing someone in from elsewhere (CIBA)

A bank's branch kiosk or a call-centre agent's tool knows who the customer says they are, and needs them to approve on their own device. With OpenID CIBA (poll mode) the app names the person, Nod emails them a link to approve, and the app polls for tokens:

nod client ciba acme kiosk on            # or PATCH /api/v1/clients/kiosk {"ciba": true}

curl -u kiosk:$SECRET https://auth.example.com/acme/bc-authorize \
  -d scope=openid -d login_hint=alice@example.com -d binding_message="K7 RIVER"
# {"auth_req_id": "…", "expires_in": 600, "interval": 5}

curl -u kiosk:$SECRET https://auth.example.com/acme/token \
  -d grant_type=urn:openid:params:grant-type:ciba -d auth_req_id=…
# authorization_pending, slow_down, then tokens; access_denied if they say no

Logging out