Start RFC8628 device authorization
Changed onStarts OAuth 2.0 Device Authorization Grant (RFC 8628). Returns device_code for the CLI and user_code for browser verification.
By default the returned verification_uri / verification_uri_complete point at the project's managed device-approval page served by this API (/projects/{projectId}/auth/hosted?action=device&user_code=...&anon_key=...), which requires managed auth enabled and a default anon key for the project.
Projects can override this by setting device_verification_url on the auth config (PATCH /auth/config). When set, that URL is returned as-is with the user_code appended (no action=device hint and no embedded anon key — the page brings its own), so a CLI's login command surfaces the project's own RFC 8628 approval page. With a custom URL, device login does not require managed auth to be enabled; the custom page's origin must be in the project's auth CORS allowlist to call POST /auth/device/verify. Either way the verification page must authenticate the end user and call POST /auth/device/verify with the user_code. See the device-auth guide for both approaches.
Request
- Base URLhttps://api.volcano.dev
- Authnone declared
Request body
Enabled device OAuth client ID for the target project
Response
Device authorization started
Browser verification URL. Points at the project's managed device approval page served by this API: /projects/{projectId}/auth/hosted?action=device&anon_key=.... Requires the project to have managed auth enabled and a default anon key. A custom CLI may ignore this and direct users to its own RFC 8628-compatible page instead (see the device-auth guide).
Same as verification_uri but with the user_code prefilled (&user_code=...). This is the URL most device clients open.
Changes
- breaking
the response's body type changed from no type to
objectfor status - breaking
the response's body type changed from no type to
objectfor status - info
added the optional property
error_descriptionto the response with the status
7 more changes in this revision
- breaking