docs(cli): document interactive login and multi-account#56
Merged
Conversation
The browser-based 'deploys login' flow shipped but the CLI docs only mentioned it in one line of the auth precedence list — there was no walkthrough of signing in, switching between accounts, or using it on a headless host. Add a 'Logging in' section covering: - deploys login (OAuth authorization-code + PKCE over a loopback redirect), where the credential is stored (config dir; DEPLOYS_CONFIG_DIR), and that it is the stored-login tier of the precedence list (so it doesn't interfere with CI's env-var auth). - Multiple accounts keyed by (endpoint, email): deploys auth list / switch, -account / DEPLOYS_ACCOUNT, deploys auth status, session expiry + re-login (the CLI has no refresh grant yet, so it warns and you run deploys login again), deploys logout / -all. - Headless/SSH use via deploys login -no-browser, and deploys auth token for scripts. Every command and flag was checked against the CLI help registry (internal/runner/help.go) and the credential precedence in main.go.
|
Preview deleted (PR closed). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The browser-based
deploys loginflow (and the multi-account management around it) shipped, butcontent/automation/cli.mdonly referenced it in a single line of the auth-precedence list — there was no walkthrough. This adds a "Logging in" section covering:deploys login— the OAuth authorization-code + PKCE flow over a loopback redirect, where the credential is stored (your config dir;DEPLOYS_CONFIG_DIRto override), and that it's the stored-login tier of the precedence list, so it doesn't interfere with CI's env-var auth.(endpoint, email):deploys auth list/switch,-account/DEPLOYS_ACCOUNT,deploys auth status, session expiry and re-login (the CLI has no refresh grant yet, so it warns near expiry and you rundeploys loginagain),deploys logout/-all.deploys login -no-browser(forward the printed callback port) anddeploys auth tokenfor scripts.Why
A whole shipped, user-facing authentication path was effectively invisible in the docs. Interactive login is the easiest way for a human to use the CLI, so it deserves a real walkthrough next to the env-var/CI options.
Verification
Every command, flag, and behavioral claim was checked against the CLI source:
login/logoutaliases —deploys/internal/runner/help.go.main.gonewAPIClient.main.go/internal/auth/resolve.go.Content-only change to one Markdown file; the
/access/service-accounts/link is already used elsewhere in the page.