sincecutoff.com
← all changes

doctl auth login signs in through browser OAuth

Introduced 2026-10-13 · score 0.96

HOW TO USE IT

When authenticating doctl for repository work, run `doctl auth login` to approve browser OAuth, or `doctl auth init` to enter an API token; credentials are stored in an authentication context. Use `--no-browser`, `--timeout`, `--scopes`, `--save-scope`, or `--context <name>` to adjust browser sign-in as needed.

doctl auth login
doctl auth login --scopes "read write"
doctl auth init

WHY THIS HELPS

Authenticate doctl for repository work by signing in through a browser or supplying an API token.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.184.0
  • --no-browser: Print the authorization URL instead of opening a browser.
  • --timeout: Change how long the authorization link is valid; default is 5 minutes. Documented unit/value format not found.
  • --scopes: Space-separated permissions requested up front, such as `read write` or `droplet:read account:read`; absent means choose permissions on the authorization screen.
  • --save-scope: Persist `--scopes` as the default for later sign-ins; combine with `--scopes ""` to clear the saved default. No mutual-exclusion rule documented.
  • --context <name>: Save sign-in credentials to a named context; without it, credentials replace those in `default`, which is selected.
  • API token (auth init prompt) (required): Enter the DigitalOcean access token generated in the Control Panel when prompted.
  • Prerequisite: For `doctl auth init`, create an API token in the DigitalOcean Control Panel first.
  • Prerequisite: Browser OAuth uses DigitalOcean's published doctl application; no app registration is needed.
  • The authorization link is valid for 5 minutes unless changed with `--timeout`.
  • Access tokens issued through browser sign-in are short-lived; doctl saves a refresh token and renews automatically when running a command.
  • Sign in again to change granted scopes or if the session is revoked.
  • Without `--context`, sign-in replaces credentials in the `default` context and selects it.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card