Skip to content

feat(cli): support deleting tokens by id #16341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2025
Merged

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Jan 30, 2025

Since API keys can be created without a name, and we already perform the deletion by ID, it makes sense to be able to delete tokens with just the ID.

Although it requires an API change, it would be nice if coder tokens list also listed other token types. Currently it only lists tokens of loginTypeToken. CLI tokens generated on /cli-auth are loginTypePassword, and as such do not show up.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson marked this pull request as ready for review January 30, 2025 07:57
@ethanndickson ethanndickson force-pushed the ethan/delete-token-by-id branch from aee1553 to 1a092c4 Compare January 30, 2025 08:14
Copy link
Member

@deansheather deansheather left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably also handle full length tokens and trim the ID part off.

@ethanndickson ethanndickson force-pushed the ethan/delete-token-by-id branch from 1a092c4 to 2949164 Compare February 3, 2025 06:56
@ethanndickson ethanndickson changed the title chore(cli): support deleting tokens by id feat(cli)!: support deleting tokens by id Feb 3, 2025
@ethanndickson ethanndickson changed the title feat(cli)!: support deleting tokens by id feat(cli): support deleting tokens by id Feb 3, 2025
@ethanndickson ethanndickson force-pushed the ethan/delete-token-by-id branch from c11fd15 to ec8ff1a Compare February 3, 2025 07:14
@github-actions github-actions bot added the stale This issue is like stale bread. label Feb 11, 2025
@ethanndickson ethanndickson removed the stale This issue is like stale bread. label Feb 11, 2025
@ethanndickson ethanndickson merged commit 5ec385b into main Feb 12, 2025
35 checks passed
@ethanndickson ethanndickson deleted the ethan/delete-token-by-id branch February 12, 2025 07:18
@github-actions github-actions bot locked and limited conversation to collaborators Feb 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants