Add support for the Device Authorization Grant (RFC 8628) to enable authentication from devices without a browser — Apple TV, Roku, CLI tools, etc.
How it works
Device requests a code: POST /oauth/device → gets device_code + user_code + verification_uri
Device displays: "Go to auth.example.com/device and enter code: ABCD-1234"
User opens phone/laptop, visits URL, enters code, logs in
Device polls: POST /oauth/token with grant_type=urn:ietf:params:oauth:grant-type:device_code
Once user approves, device gets access token + refresh token
Use case
The planned Canister tvOS app (TVML/TVMLKit) needs to authenticate with Clinch. A TV remote is not a great way to type passwords, making this the standard solution.
Also useful for CLI tools and any device with a screen but no browser.
Endpoints needed
POST /oauth/device — issue device + user codes
GET /device — user-facing page to enter the code
POST /oauth/token with grant_type=urn:ietf:params:oauth:grant-type:device_code — device polls this
Notes
User code should be short and unambiguous (e.g., ABCD-1234, no 0/O confusion)
Standard responses during polling: authorization_pending, slow_down, expired_token, access_denied
Priority
Low — this is for the tvOS app which is further down the roadmap. Logging it now since it came up in the discussion about OAuth grant types.
## Summary
Add support for the [Device Authorization Grant](https://datatracker.ietf.org/doc/html/rfc8628) (RFC 8628) to enable authentication from devices without a browser — Apple TV, Roku, CLI tools, etc.
## How it works
1. Device requests a code: `POST /oauth/device` → gets `device_code` + `user_code` + `verification_uri`
2. Device displays: "Go to auth.example.com/device and enter code: ABCD-1234"
3. User opens phone/laptop, visits URL, enters code, logs in
4. Device polls: `POST /oauth/token` with `grant_type=urn:ietf:params:oauth:grant-type:device_code`
5. Once user approves, device gets access token + refresh token
## Use case
The planned Canister tvOS app (TVML/TVMLKit) needs to authenticate with Clinch. A TV remote is not a great way to type passwords, making this the standard solution.
Also useful for CLI tools and any device with a screen but no browser.
## Endpoints needed
- `POST /oauth/device` — issue device + user codes
- `GET /device` — user-facing page to enter the code
- `POST /oauth/token` with `grant_type=urn:ietf:params:oauth:grant-type:device_code` — device polls this
## Notes
- User code should be short and unambiguous (e.g., `ABCD-1234`, no `0`/`O` confusion)
- Polling interval enforced server-side (typically 5s)
- Codes expire (typically 15 minutes)
- Standard responses during polling: `authorization_pending`, `slow_down`, `expired_token`, `access_denied`
## Priority
Low — this is for the tvOS app which is further down the roadmap. Logging it now since it came up in the discussion about OAuth grant types.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Add support for the Device Authorization Grant (RFC 8628) to enable authentication from devices without a browser — Apple TV, Roku, CLI tools, etc.
How it works
POST /oauth/device→ getsdevice_code+user_code+verification_uriPOST /oauth/tokenwithgrant_type=urn:ietf:params:oauth:grant-type:device_codeUse case
The planned Canister tvOS app (TVML/TVMLKit) needs to authenticate with Clinch. A TV remote is not a great way to type passwords, making this the standard solution.
Also useful for CLI tools and any device with a screen but no browser.
Endpoints needed
POST /oauth/device— issue device + user codesGET /device— user-facing page to enter the codePOST /oauth/tokenwithgrant_type=urn:ietf:params:oauth:grant-type:device_code— device polls thisNotes
ABCD-1234, no0/Oconfusion)authorization_pending,slow_down,expired_token,access_deniedPriority
Low — this is for the tvOS app which is further down the roadmap. Logging it now since it came up in the discussion about OAuth grant types.