01 · the device asks for codes
A device with a screen but no keyboard cannot render your login page, so it asks for a code pair: one machine-readable, one human-typeable (§3.1).
- client_id
- 1406020730the RFC §3.1 example client - devices are public clients: they identify, they do not authenticate
- scope
- example_scopewhat the device wants to do on your behalf
- endpoint
- POST server.example.com/device_authorizationa separate endpoint from /authorize - TLS is a MUST
wire - everything that movednothing yet
RFC 8628 · DEVICE AUTHORIZATION GRANT
The device console
Run the full device authorization grant (RFC 8628) in your browser: the TV shows a code, your phone approves, the device polls - with the exact slow_down rule, expiry, brute-force lockout, and the remote-phishing twist.
This is the whole device authorization grant, and you play both ends: the streaming stick that shows a code, and the phone that approves it. The authorization server issimulated - every real device endpoint either blocks browser calls (CORS) or would demand an embedded client secret and real consent, and none of them speak the RFC's exact grammar. So this console runs the RFC's own published example values, verbatim, and every check a real AS runs is the check this mock runs. The wire drawer under the console records everything that moves on the back channel; three buttons are deliberately dangerous. And #scenario=phish-yes drops you straight into the RFC's remote-phishing demo: the attacker's SMS has just arrived, their code pre-filled in the link.
- Polling is the protocol here: the client waits at least
intervalseconds (5 by default) between polls, forever. slow_downis cumulative and permanent - +5 seconds per violation, for this and every later request, until the session ends.- Most errors are terminal:
access_denied,expired_token, and anything unlisted all mean the client MUST stop polling. - The user code is short so humans can type it, and §6.1's base-20 alphabet drops vowels and digits so a misread letter fails as "wrong code" instead of silently matching another device; rate limits and short lifetimes - not longer codes - are what keep guessing hopeless.
- The code-confirmation step (does your phone's code match the device's screen?) is the one tripwire that beats remote phishing.
Remote phishing, straight from RFC 8628 section 5.4
The flow's signature attack starts on the attacker's device. They begin a perfectly legitimate device authorization, then social-engineer the victim: "your stream stick was paused - visit this URL and enter this code." The victim, signing in with their own credentials on their own phone, approves what looks like their own device.
The approval lands on the attacker's poll. The wire shows the moment it happens: a token for the victim's account, delivered to a device the victim has never seen. Their own TV is still polling politely - it will poll until expiry and receive nothing butexpired_token.
The spec's mitigations are all on display in the console: consent screens that say what is being authorized and show device info, short code lifetimes, and - the one that actually catches it - the section 3.3.1 confirmation step when the code arrives embedded in a link or QR instead of typed from the device's screen.
- RFC 8628: OAuth 2.0 Device Authorization GrantDenniss, Bradley, Jones, Tschofenig (IETF, August 2019) - sections 3.1-3.5 are the flow the console runs, section 5 the security analysis, 6.1 the user-code format. The example values are the RFC's own.
- RFC 9700: Best Current Practice for OAuth 2.0 Securitywhy the refresh token in the console comes with a warning: devices are public clients, and their stored credentials are extractable
- The device flow, on the wirethe deep-dive page this console cross-reads - the same RFC example values, annotated hop by hop
- oauth.net: Device FlowAaron Parecki's annotated overview on the OAuth official site