feat: add auth credentials remove command#473
Open
yamagucci wants to merge 3 commits intosteipete:mainfrom
Open
feat: add auth credentials remove command#473yamagucci wants to merge 3 commits intosteipete:mainfrom
auth credentials remove command#473yamagucci wants to merge 3 commits intosteipete:mainfrom
Conversation
Add a new subcommand to delete stored OAuth client credentials. Previously there was no way to remove credentials via the CLI — only `set` and `list` were available. The command: - Deletes the credentials file for the specified client (or default) - Cleans up any domain mappings that reference the deleted client - Supports --dry-run, --force, --json flags (consistent with other destructive commands) - Prompts for confirmation before deletion Usage: gog auth credentials delete # delete default client gog --client work auth credentials delete # delete named client Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Rename `delete` to `remove` for consistency with `auth remove` - Accept optional client name as positional argument (e.g. `gog auth credentials remove work`) - Support `all` to remove every stored credential at once - Falls back to --client flag or default when no arg is given Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
auth credentials delete commandauth credentials remove command
When removing OAuth client credentials, find and delete all refresh tokens stored under that client. The confirmation prompt now shows which accounts will be affected (e.g. "remove OAuth credentials for client "work" and 2 associated token(s) ([email protected], [email protected])"). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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.
Summary
gog auth credentials removesubcommand to remove stored OAuth client credentialssetandlistwere available — there was no way to remove credentials via the CLI--domain) that reference the removed clientUsage
Confirmation prompt example
Implementation
config.DeleteClientCredentialsFor(client)— removes the credentials JSON fileAuthCredentialsRemoveCmd— CLI command following the same patterns asauth remove[<client>]argumentallto remove every stored credential--clientflag or default when no arg is given--dry-run,--force,--jsonoutputTest plan
go build ./...passesgo test ./internal/config/... ./internal/cmd/...passesgog auth credentials remove --helpshows correct usage🤖 Generated with Claude Code