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

Finish with a token or a terminal error

04

A server decision and a validated device request determine the result. Error names control whether the client can continue.

RFC 8628 · § 3.5EXAMPLE
4 / 4
Finish with a token or a terminal errorSeparate expiry or other error is terminal. Expired session may lead to a new request, but user interaction before restarting is recommended. Unknown errors also stop polling.Expired or another errorRequesting deviceToken endpointexpired_token / other errorStop polling this sessionNew request MAY start a new sessionSHOULD wait for user interactionSeparate outcomes · no denial-to-success transition
04
End expired or otherwise failed sessions

Separate failure outcome: expired and unfamiliar errors are terminal. A new session uses a new authorization request; user interaction before restarting is a SHOULD.

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

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 user code is not an access token, and an approval is not the token response.

  • While the user has not finished authorizing, the token endpoint returns authorization_pending. The device waits before repeating; no access token is already delivered in that state (§3.5).
  • If the user approves and the server validates the device token request, the token endpoint returns the OAuth §5.1 success response: access_token and token_type are REQUIRED. A refresh_token is OPTIONAL. Token lifetime expires_in is RECOMMENDED in that response and is distinct from the REQUIRED code lifetime in the earlier device response (§3.5; RFC6749§5.1).
  • access_denied means the authorization request was denied. expired_token means device_code expired and the session concluded. Both stop polling. An expired session MAY lead to a new device authorization request, but the client SHOULD wait for user interaction rather than restart automatically (§3.5).
  • If an error is neither authorization_pending nor slow_down, the client MUST stop polling and SHOULD react appropriately, for example showing an error. This includes unfamiliar error codes; it is a whitelist of continuing errors, not just a list of two known fatal errors (§3.5).
  • Any success shown assumes correct server-side validation, client requirements and user authorization. This guide does not implement accounts, consent verification, token storage, scope enforcement or an OAuth server. A locally expired timer never manufactures a success response.
DETAILS

The four states are separate outcomes, not a sequence where denial becomes success. Only the success outcome draws an access token reaching the device.

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 ↗