Visual RFC.
ALL RFCs / RFC 8628
Read the RFC ↗
RFC 8628 / Device authorization

Request two codes for different channels

01

A limited-input device asks the authorization server for a short-lived session. The human code and the device code serve different jobs.

RFC 8628 · § 3.1EXAMPLE
4 / 4
Request two codes for different channelsAfter instructions the device posts the machine device code and exact device grant type to the token endpoint, not the browser authorization endpoint. Full URN is in notes; fictional values.Two codes, two different jobsDevice appToken endpointTLS POST: device_codegrant_type: device grant URNdevice_code: machine-example-secretclient_id: picnic-tvFull grant URN is in the chapter notesFictional session · device response is not a token
04
Use the machine code at the token endpoint

After giving instructions, the public client sends the device grant URN, device_code and client_id in an HTTPS token request. There is no browser redirect back into this device.

Source for this drawing: RFC 8628 · Read RFC section 3.1 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

A client identifier identifies the app; it is not a password.

  • OAuth is a framework for delegated access. The device client is an app on a TV, printer or similar Internet-connected device with limited input or no suitable browser. The authorization server asks the user whether to allow access. RFC 8628 extends OAuth 2.0; it does not replace browser-based native-app authorization on capable phones (§1).
  • The client SHOULD begin a device authorization request only when prompted by the user, rather than automatically on startup or after an earlier failure (§3.1). The device must already be able to make outbound HTTPS requests and communicate a URI and code; an inbound callback to the device is not required (§1).
  • The client POSTs a UTF-8 application/x-www-form-urlencoded body to the device authorization endpoint. client_id is REQUIRED if the client is not authenticating; scope is OPTIONAL. Confidential clients authenticate under OAuth §3.2.1; public clients identify themselves with client_id. A distributed app identifier or embedded secret is not automatically confidential (§§3.1,5.6).
  • All device requests MUST use TLS and implement BCP 195 best practices (§3.1). Parameters without a value MUST be treated as omitted; the server MUST ignore unrecognized request parameters; request and response parameters MUST NOT appear more than once. The separate device authorization endpoint is not the browser authorization endpoint or the token endpoint.
  • A successful device response is HTTP 200 JSON with REQUIRED device_code, user_code, verification_uri and expires_in. verification_uri_complete and interval are OPTIONAL. expires_in is the lifetime in seconds of both codes; omitted interval defaults to five seconds, which clients MUST use (§3.2). The response is not an access token.
  • After communicating user instructions, token requests go to the token endpoint with REQUIRED device_code and grant_type=urn:ietf:params:oauth:grant-type:device_code; client_id is REQUIRED when not authenticating. Clients issued credentials or other authentication requirements MUST authenticate (§3.4). The human user_code is not a substitute for device_code.
DETAILS

All endpoints, codes and lifetimes are fictional teaching examples. HTTPS arrows summarize transport; no requests to an authorization service or real credentials are used.

Read the RFC section ↗

All chapters in RFC 8628

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗