Skip to content

Fortified IDDocs

Device Authorization Flow

Authenticator handling OAuth 2.0 Device Authorization Flow in OIDC.

There are two locations where configuration for an OIDC OpenID Provider (OP) using the Device Authorization Flow can be managed:

  1. Verification Flow / Authenticator Chain – You configure the wrapper authenticator and the authenticators that perform the actual user authentication here.
  2. Back-Channel Endpoints – By clicking the following link, you can manage back-channel endpoints such as device_authorize, Token and discovery metadata.

No identification is done by this authenticator itself. It acts as a controller for the OAuth 2.0 Device Authorization Flow and for issuing tokens once the user has completed authentication.

Typically this authenticator is the user-facing verification entry point for flows started by a relying party using device_authorize.

Actual user identification is done elsewhere in the configured chain.

The normal pattern is:

  1. A relying party starts Device Flow using the OIDC module.
  2. The end-user visits verification_uri or verification_uri_complete.
  3. UserCodeAuthenticator validates the user_code and binds the verification flow to the correct device session.
  4. The remaining authenticators in the chain perform the actual authentication.
  5. The relying party polls the token endpoint until the flow completes.

Common Authenticator configuration can be found here.

NameDescriptionDefault valueMandatory
chainList of authenticators performing the actual user authentication. In practice the first step is typically a DeviceUserCode authenticator followed by a selector or another authenticator.N/Atrue
sign_refList of OIDC signing keys used for overlapping key rotation. Recommended for new configurations.N/Afalse
keystoreLegacy single-key keystore configuration used for JWT signing when sign_ref is not configured.N/Afalse
id_token_ttlID token time to live in minutes.5false
access_token_ttlAccess token time to live in milliseconds.60000false
use_jwt_access_tokensEnables access tokens as JWT.falsefalse
jwt_access_token_ttlAccess Token time to live in minutes when access tokens are sent as JWT.5false
enable_refresh_tokenEnables the use of refresh tokens.falsefalse
refresh_token_ttlRefresh token time to live in milliseconds.1800000false
rpsList of relying parties. Must include at least one relying party.N/Atrue
success_locationIf configured, the user agent is redirected here when the verification flow completes successfully. If omitted, a simple built-in completion page is returned.N/Afalse
failure_locationIf configured, the user agent is redirected here when the verification flow fails. If omitted, a simple built-in error page is returned.N/Afalse

The normal first step in the chain is a DeviceUserCode authenticator.

Its purpose is to:

  • validate the user_code
  • resolve the correct device session
  • bind the browser verification flow to that device session before continuing in the chain

The authenticator supports both:

  • prefilled user_code from verification_uri_complete
  • manual entry of user_code

The DeviceUserCode authenticator follows the general conventions of the Fortified Web Authenticator API.

All requests use the HTTP PUT method with Content-Type: application/json, sent to the directory URL the view was loaded from. The session cookie must be sent with every request.

MessagePurpose
initFetch the current status and any prefilled user_code. Send it when the view loads.
startSubmit the user_code and bind the browser to the device session.
cancelCancel the verification.

Send this when the view loads. It moves a pending authenticator into progress and reports whether a user_code was supplied in the URL, so the view can prefill the input field.

{
"type": "init"
}

prefilled is the user_code request parameter, or an empty string when none was supplied. status is the authenticator status: PENDING, IN_PROGRESS, COMPLETED, or FAILED.

Submit the code the user entered. When user_code is omitted from data, the user_code request parameter is used instead.

{
"type": "start",
"data": {
"user_code": "<user-code>"
}
}

A request can be canceled at any time. This is done by sending a cancel request.

{
"type": "cancel"
}

Expect HTTP status code 200. Anything else is to be considered an error.

The body is a JSON message: an init message while the code is being collected, and a complete, cancel, or failure message once the step ends, as described in Web Authenticator API.

If success_location is configured, the user is redirected there after a successful verification flow.

If failure_location is configured, the user is redirected there after a failed verification flow.

If these locations are not configured, the wrapper returns a simple built-in text response.

When the user cancels later steps in the verification chain, the underlying Device Flow request remains PENDING. This means the user can re-enter the same user_code and continue the flow as long as the request has not expired.

The flow uses a device session in the shared Access session model.

Important behavior:

  • the same user_code can be reused while the flow is PENDING
  • after the first successful token response, the device-flow session state is cleaned up
  • the design supports clustered/session-replicated deployments

If you want branded completion pages instead of the built-in text response, set success_location and failure_location to your own endpoints.

One simple way to do this is to configure an InformationEndpoint that serves static HTML pages with your normal layout and branding.

On a successful verification flow, an event is logged containing the following:

  • WEB_100101
  • IDENTIFIER (user traceid)
  • DESTINATION_SERVICE_NAME (OIDC client_id, if available)
  • SOURCE_ADDRESS (user IP address)

On a failed verification flow, an event is logged containing the following:

  • WEB_100102
  • IDENTIFIER (user traceid)
  • DESTINATION_SERVICE_NAME (OIDC client_id, if available)
  • SOURCE_ADDRESS (user IP address)

The back-channel part of Device Flow is configured on the OIDC module. See Device Authorization Flow.