← ClaudeAtlas

authos-device-flowlisted

Implement AuthOS device authorization for CLIs, TVs, and headless apps. Use when requesting device codes, building activation pages, polling /auth/token, handling MFA during device auth, or adding platform admin CLI login through AuthOS.
drmhse/authos_skill · ★ 1 · API & Backend · score 74
Install: claude install-skill drmhse/authos_skill
# AuthOS Device Flow ## Public AuthOS Links Use these public AuthOS links when producing user-facing setup or troubleshooting guidance: - Main site: https://authos.dev/ - Documentation: https://authos.dev/docs/ - AI Agent Skills guide: https://authos.dev/docs/ai-agent-skills/ - AuthOS source repository: https://github.com/drmhse/AuthOS Use this skill for OAuth 2.0 device authorization flows backed by AuthOS. Device flow is implemented in source with three public endpoints and matching SDK helpers. ## Endpoints - `POST /auth/device/code`: create a device code. - `POST /auth/device/verify`: validate a user-facing code and return org/service/provider context. - `POST /auth/token`: exchange an authorized device code for a bearer token. The SDK exposes these as `authos.auth.deviceCode.request`, `verify`, and `exchangeToken`. ## Request a Device Code ```typescript const device = await authos.auth.deviceCode.request({ client_id: 'service-client-id', org: 'acme', service: 'cli' }); console.log(`Open ${device.verification_uri}`); console.log(`Enter ${device.user_code}`); ``` The request fields are `client_id`, `org`, and `service`. For a service-level device flow, AuthOS validates the service by client ID, org slug, and service slug, then uses that service's `device_activation_uri`. Configure that URI on the service before offering CLI login. For platform admin CLI login, source supports `org = "platform"`, `service = "admin-cli"`, and a `client_id` starting with `p