Repository navigation
Conversation
pulse-cli drops its own OAuth login (auth login, auth logout, --auth oauth, the token store and the login sharing across profiles and worktrees). Single sign-on runs through PULSE_CLI_TOKEN_COMMAND, which works for people and agents alike. The command now learns the engine it serves (PULSE_CLI_TOKEN_URL, PULSE_CLI_TOKEN_PROFILE) and its token is cached per engine URL, so engines with different logins never share a token. BREAKING CHANGE: pulse-cli auth login, auth logout, --auth oauth, the PULSE_CLI_OAUTH_* variables, the --oauth-* options of config set and the LOGIN_REQUIRED error are removed. A profile with auth type "oauth" fails with CONFIG (exit 3). Set PULSE_CLI_TOKEN_COMMAND to a command that prints a token (docs/cli/authentication.md#single-sign-on). Closes #489
✅ Deploy Preview for spectacular-cobbler-f6c85b ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
Author
|
Closing for now: the OAuth browser login is still needed, e.g. for logins against identity providers that only offer the authorization code flow. The work stays on this branch for reference; #489 stays open. |
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.
Why
Most pulse-cli commands are run by AI agents, and an agent cannot click through a browser login: without a stored login it stopped with
LOGIN_REQUIRED. The CLI already had a way that works for people and agents alike,PULSE_CLI_TOKEN_COMMAND, so the CLI's own OAuth login (about 3,800 lines of code and 8,000 lines of tests) goes.What
pulse-cli auth login,auth logout,--auth oauth, thePULSE_CLI_OAUTH_*variables, the--oauth-*options ofconfig set, the OAuth token store and theLOGIN_REQUIREDerror.auth statusstays and shows the bearer token."type": "oauth"and--auth oauthfail withCONFIG(exit 3) and a hint pointing toPULSE_CLI_TOKEN_COMMAND.PULSE_CLI_TOKEN_URLand, with a profile,PULSE_CLI_TOKEN_PROFILE. Its token is cached per engine URL, so engines with different logins never share a cached token. A command for a single login ignores the variables and behaves as before.docs/cli/authentication.md: a "Single sign-on" section with ready-to-copy token commands for Keycloak, Entra ID and Auth0, a "Several logins" section with a dispatcher script, and a migration note. The otherdocs/clipages, the CLI README,SKILL.md, guide and help texts andapps/cli/CLAUDE.mdfollow.authcommand is removed with its gate cases.apps/cli,docs/cliand the dependency-cruiser config changes; the MCP server and the VS Code extension are untouched.Verification
apps/cli:tsc --noEmit, ESLint andvitest run(3,133 tests, coverage floors) pass.pnpm lint:architecture,lint:architecture:cli,lint:deadcode:cli,lint:ratchets,format:check,node --test scripts/*.test.mjsand the docs-refs and old-names tests pass."type": "oauth"fail with the documentedCONFIGerror; without theauthblock and with a token command,config showandping --dry-runresolve as expected.test:engines), the fullpnpm buildand the repo-widepnpm typecheck.Breaking changes
pulse-cli auth login,auth logout,--auth oauth, thePULSE_CLI_OAUTH_*variables, the--oauth-*options ofconfig setand theLOGIN_REQUIREDerror are removed. To migrate, remove theauthobject of an OAuth profile and setPULSE_CLI_TOKEN_COMMANDto a command that prints a token (e.g.az account get-access-token --resource <api> --query accessToken -o tsv), seedocs/cli/authentication.md#single-sign-on. The issue suggested one release in which the login still works but warns; this PR removes it directly.Out of scope / Follow-ups
Closes #489