# What is OAuth 2.0 Device Authorization Grant?

> A way for a device with no usable browser or keyboard, such as a smart TV or printer, to get an OAuth token: it shows the user a short code, and the user approves on a phone or laptop.

Explainer by Boston Identity, 2026-10-21. 6 min read. https://insights.bostonidentity.com/glossary/oauth-device-grant

- What it is: protocol
- Defined by: IETF, RFC 8628 (Standards Track)
- Who it's for: Teams approving sign-in on devices and developer tools

## What is OAuth 2.0 Device Authorization Grant?

The device authorization grant is an extension to OAuth 2.0, the standard way an app gets permission to call an API on a user's behalf. The Internet Engineering Task Force (IETF) published it in August 2019 as RFC 8628, a standards-track document [S1]. It is sometimes called the device flow [S1 §1].

Some devices that connect to the internet have no browser, or make typing so awkward that signing in on them is impractical; the RFC names smart TVs, media consoles, picture frames and printers [S1]. The grant lets such a device get the user's approval through a browser on a second device, such as a phone [S1 §1]. The device only has to make outbound HTTPS requests and show the user a web address and a code [S1 §1]. The grant does not require anything to be sent back from the phone to the device, so the device keeps asking the server until the user is done [S1 §1].

Think of it like this: It works like activating a streaming app by reading a code off the TV and typing it into a website on your phone. The comparison stops at trust: the website never sees the TV, so it cannot tell whether the screen showing the code is really in front of you.

Not the same as: Not the same as CIBA, the backchannel sign-in where the service pushes an approval request to the user's phone. In the device grant the user carries a code from the device's screen to a web page themselves.

## How does OAuth 2.0 Device Authorization Grant work?

Three parties take part: the device client (the app on the TV or printer), the authorization server that issues tokens, and the user, who holds a phone or laptop with a browser [S1 §1].

[Figure: The device never shows the user its device code: it hands the person a short user code to type on a phone, then polls the authorization server until the approval lands.]

1. **The device asks for codes.** When the user asks to sign in, the device sends a POST request to a new endpoint, the device authorization endpoint [S1 §3.1]. It identifies itself with its client identifier, or authenticates if it holds client credentials, and it may name the scope of access it wants [S1 §3.1]. Every request from the device must use TLS (Transport Layer Security) [S1 §3.1]. The device should start this only when the user prompts it, not automatically when the app starts [S1 §3.1].
2. **The server issues two codes.** The authorization server answers with a device code, a user code, a verification address and a lifetime in seconds for the two codes [S1 §3.2]. The user code is the short one a person types, such as WDJB-MJHT, while the device code is for the device alone and should not be shown [S1 §3.2, §3.3]. The response may set a polling interval; without one, the device must wait 5 seconds between polls [S1 §3.2].
3. **The device tells the user where to go.** The device shows the user code and the verification address and tells the user to open that address in a browser on another device [S1 §3.3]. If the server supplied an address with the code built in, the device may show it as a QR (Quick Response) code to save typing [S1 §3.3.1]. Even then, the device must still display the user code [S1 §3.3.1].
4. **The user approves on the phone.** The user opens the address, signs in to the authorization server and enters the user code, which tells the server which device session this is [S1 §3.3]. The server should tell the user what they are approving and ask them to approve or deny [S1 §3.3]. Beyond the address and the code, the server sets the exact steps, and it may add sign-up or extra security checks [S1 §3.3].
5. **The device polls for a token.** Meanwhile the device sends its device code to the token endpoint again and again, with the grant type urn:ietf:params:oauth:grant-type:device_code [S1 §3.4]. While the user is still deciding, the server answers authorization_pending, and the device must wait at least the interval before it asks again [S1 §3.5]. A slow_down answer means the device must add 5 seconds to its interval for this and every later request [S1 §3.5].
6. **The server returns a token or ends it.** Once the user approves, the token endpoint returns an access token, and optionally a refresh token [S1 §1, §3.5]. If the user declines, the answer is access_denied; if the codes have run out, it is expired_token [S1 §3.5]. On any error other than the two pending answers, the device must stop polling [S1 §3.5].

## Why does OAuth 2.0 Device Authorization Grant matter now?

In Auth0's own tutorial, the agent Claude Code reaches the Auth0 Management API through the Auth0 MCP (Model Context Protocol) server on the developer's personal device-flow login, kept in the operating system's keychain [BI-FIND-2026-0734](https://insights.bostonidentity.com/ref/BI-FIND-2026-0734). The agent has no identity of its own, so every change it makes is logged as the developer's [BI-FIND-2026-0734](https://insights.bostonidentity.com/ref/BI-FIND-2026-0734). The demo grants fifteen scopes, among them editing Actions that run in production [BI-FIND-2026-0734](https://insights.bostonidentity.com/ref/BI-FIND-2026-0734).

An IETF draft on cross-device sign-in security, not yet a standard, ranks the device grant last of three options, after FIDO (Fast IDentity Online) cross-device sign-in and CIBA [BI-FIND-2026-1079](https://insights.bostonidentity.com/ref/BI-FIND-2026-1079). It recommends the grant only with added mitigations and only when other protocols are not viable, and it advises against it where the protected resources are "sensitive, high value, or business critical" [BI-FIND-2026-1079](https://insights.bostonidentity.com/ref/BI-FIND-2026-1079). The draft starts from the point that in QR-code, user-code and push sign-ins the request passes between devices over an unauthenticated channel, so consent phishing works even when multi-factor authentication (MFA) is deployed [BI-FIND-2026-1080](https://insights.bostonidentity.com/ref/BI-FIND-2026-1080). It rates CIBA as less susceptible than the device grant, though still open to attackers who know or can guess a user's identifier [BI-FIND-2026-1081](https://insights.bostonidentity.com/ref/BI-FIND-2026-1081).

## Where does it fit?

- Compared with CIBA: CIBA also splits sign-in across two devices, but the service sends a push approval to the user's phone and no code changes hands. The cross-device draft rates it less susceptible than the device grant [BI-FIND-2026-1081](https://insights.bostonidentity.com/ref/BI-FIND-2026-1081).
- Compared with PKCE: PKCE (Proof Key for Code Exchange) is not part of RFC 8628. The RFC says the device grant is not meant to replace browser-based OAuth in apps on capable devices such as smartphones, which should follow the native-app practices instead [S1 §1].
- Compared with OAuth 2.0 Token Revocation: Token revocation is about cancelling a token after it is issued. RFC 8628 defines no way to cancel one: it covers only how the device first obtains its token [S1 §3].

## What goes wrong?

- Remote phishing. An attacker can start the flow on a device they hold and email the victim the address and user code [S1 §5.4]. We read this as the victim approving access for the attacker's device. The RFC recommends telling the user they are authorizing a device and confirming it is in their possession [S1 §5.4]. A short user-code lifetime limits codes sent by email or text, but it does not stop a phisher who is talking to the victim in real time [S1 §5.4]. The cross-device draft adds that user education is insufficient on its own [BI-FIND-2026-1080](https://insights.bostonidentity.com/ref/BI-FIND-2026-1080).
- QR codes remove a check. When the user scans the complete address, they no longer type the code, so the RFC calls confirming possession of the device particularly important [S1 §5.4].
- Guessable user codes. User codes are short so people can type them, and the RFC recommends that the server rate-limit attempts [S1 §5.1]. Its example: an 8-character code from a 20-letter alphabet carries about 34.5 bits, so limits would need to allow only 5 guesses to keep an attacker's odds at one in 2^32 [S1 §5.1].
- Split trust. The device that gets the token is not the one the user approves on, so signals from the approving user's session and device are not always relevant to whether the requesting device can be trusted [S1 §5.3].
- Shoulder surfing. Someone who can see the device's screen may finish the approval before the real user does [S1 §5.5].
- No secret on the device. Device clients generally cannot keep their credentials secret, so unless more is done they should be treated as public clients, which can be impersonated [S1 §5.6].

## What should a security leader ask?

1. Which applications in our identity provider allow the device authorization grant, and can any of them reach admin or production APIs?
2. When an agent or tool runs on a developer's device-flow login, how would our logs tell its changes from the developer's own?
3. Does our approval page show which device and app the user is authorizing, and ask them to confirm it is in front of them?
4. Does our authorization server rate-limit user-code attempts, and how long does a user code stay valid?
5. For which of these sign-ins could we move to FIDO cross-device sign-in or another flow instead?

## Sources

- [S1] [OAuth 2.0 Device Authorization Grant (RFC 8628)](https://www.rfc-editor.org/rfc/rfc8628) (IETF, Standards Track, August 2019)

## Evidence

- [BI-FIND-2026-0734](https://insights.bostonidentity.com/ref/BI-FIND-2026-0734): In Auth0's own tutorial, Claude Code reaches the Auth0 Management API through the Auth0 MCP server using the developer's personal device-flow login, kept in the operating system's keychain; the agent has no identity of its own, so every change it makes is logged as the developer's. The demo grants fifteen scopes, among them creating client grants, reading client credentials and editing Actions that run in production, while the text tells readers to grant only what they need. In the session the agent creates a new machine-to-machine application and writes its client secret to a local .env file. (from "Auth0's own Claude Code tutorial runs the agent on the developer's login and hands it fifteen admin scopes")
- [BI-FIND-2026-1079](https://insights.bostonidentity.com/ref/BI-FIND-2026-1079): The draft's protocol-selection summary ranks three options. FIDO cross-device authentication, the CTAP 2.2 "hybrid transports" flow that lets a phone act as the authenticator for signing in on another device, "provides the best protection against attacks on the unauthenticated channel". It proves the two devices are close with Bluetooth Low Energy advertisements, while an authorization server, the draft notes, "cannot independently measure or enforce proximity on its own." FIDO2/WebAuthn SHOULD be used whenever the devices are capable and the device being signed in to has no suitable FIDO credential of its own. If FIDO is not available, CIBA is the alternative, though it is still open to attackers who know or can guess a user's identifier. The OAuth device authorization grant (RFC 8628) comes last: it is RECOMMENDED only with additional mitigations, and the draft's guidance is to use it only when other protocols are not viable and to avoid it where the protected resources are "sensitive, high value, or business critical." (from "OAuth's cross-device guidance ranks FIDO first, then CIBA backchannel login, and the device-code flow last")
- [BI-FIND-2026-1080](https://insights.bostonidentity.com/ref/BI-FIND-2026-1080): The draft's starting point is that in QR-code, user-code and push sign-ins the request passes between devices over an unauthenticated channel, and "the only mitigation against this unauthenticated channel is the user's judgement." Consent phishing therefore works "even when multi-factor authentication is deployed", since the attacker sets out to persuade the user to grant authorization rather than to steal credentials. User education, it says, is "insufficient on its own", because carefully designed attacks can be practically indistinguishable from real flows even for well-trained users. Its requirements follow from that: implementers MUST perform a risk assessment before implementing cross-device flows and MUST select appropriate mitigations from the ones the draft lists, SHOULD include proximity among them if possible, and SHOULD avoid cross-device flows if the risks cannot be sufficiently mitigated. (from "OAuth's cross-device guidance ranks FIDO first, then CIBA backchannel login, and the device-code flow last")
- [BI-FIND-2026-1081](https://insights.bostonidentity.com/ref/BI-FIND-2026-1081): Three of the draft's hypothetical examples show push approvals, the backchannel pattern CIBA uses, being abused where no code changes hands. An attacker with a list of a bank's user identifiers triggers a transaction request for each, and "a small percentage grants authorization". A fake helpdesk caller has a user decline a run of fraudulent requests, then approve one that moves all the funds to a new account. And an attacker floods a network administrator with requests at night until one is approved by accident. The draft ties the first of these to its rating of CIBA: less susceptible than the device grant, but "still vulnerable to attackers who know or can guess the user identifier". Of its mitigations, rate limits slow such attacks but do not prevent targeted ones, and authenticate-then-initiate lets the server prevent an attacker from starting the request at all, though it needs a device able to run phishing-resistant sign-in, which the draft says may remove the need for a cross-device flow. (from "OAuth's cross-device guidance ranks FIDO first, then CIBA backchannel login, and the device-code flow last")

---

© 2026 Boston Identity LLC. All rights reserved. Published by Boston Identity LLC.
Quote up to 100 words with the credit "Boston Identity, IAM Insights" and a link to https://insights.bostonidentity.com/glossary/oauth-device-grant as the source. Claim numbers may be cited freely. Training, fine-tuning and text-and-data-mining use of this page is permitted.
Terms: https://insights.bostonidentity.com/terms · How to cite: https://insights.bostonidentity.com/cite
