Skip to content

Commit 89d4933

Browse files
benw5483Actual AI Factory Botclaude
committed
docs(auth): frame login --device as browserless human sign-in, not CI
The device-authorization grant (RFC 8628) is human-delegated — a person must approve the code + URL on the approval page — so it is not an unattended path. The `--device` help text listed "CI" as a use case; correct it to a human signing in from a remote/SSH shell with no local browser, and point unattended callers to `auth create-token` instead. Also flag an unverified assumption: the device grant drops `offline_access` and banks on the server returning a refresh token anyway. That has not been confirmed against the live endpoint, so the scope comment now says so rather than asserting it as fact. Generated by the operator's software factory. On behalf of: @benw5483 Co-Authored-By: Actual AI Factory Bot <factory-bot@actual.ai.invalid> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 2c1c12b commit 89d4933

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

src/auth/oauth.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ const DEFAULT_CLIENT_ID: &str = "actual-cli";
2929
const DEFAULT_SCOPES: &str = "openid profile offline_access adr:query adr:review";
3030

3131
/// Default scopes for the browserless device-authorization grant. Colon-form
32-
/// resource scopes only — the device grant still returns a refresh token
33-
/// without an explicit `offline_access`. Overridable via `ACTUAL_OAUTH_SCOPES`.
32+
/// resource scopes only, dropping `offline_access`.
33+
///
34+
/// UNVERIFIED: whether the server returns a refresh token for the device grant
35+
/// without an explicit `offline_access` has not yet been confirmed against the
36+
/// live endpoint, and the refresh path depends on it. If the server does not
37+
/// return one, add `offline_access` here (or via `ACTUAL_OAUTH_SCOPES`).
38+
/// Overridable via `ACTUAL_OAUTH_SCOPES`.
3439
const DEFAULT_DEVICE_SCOPES: &str = "adr:query adr:review mcp:invoke";
3540

3641
/// URN grant type for the OAuth 2.0 device-authorization grant (RFC 8628 §3.4).

src/cli/args.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,11 @@ pub struct LoginArgs {
475475
pub no_browser: bool,
476476

477477
/// Use the browserless device-authorization flow (RFC 8628): print a short
478-
/// code + URL to approve on any device, then poll for the session. Intended
479-
/// for remote/SSH/CI shells with no local browser. `--org` is ignored in
480-
/// this mode (the org is selected on the approval page).
478+
/// code + URL for a person to approve on any device, then poll for the
479+
/// session. For a human signing in from a remote or SSH shell with no local
480+
/// browser — a person must approve the code, so this is not an unattended
481+
/// path (CI has no approver; use `auth create-token` there instead). `--org`
482+
/// is ignored in this mode (the org is selected on the approval page).
481483
#[arg(long)]
482484
pub device: bool,
483485
}

0 commit comments

Comments
 (0)