Skip to content

Remove deprecated auth token option - #406

Closed
cloudsmith-iduffy wants to merge 3 commits into
masterfrom
cloudsmith-iduffy-remove-auth-token-flag
Closed

Remove deprecated auth token option#406
cloudsmith-iduffy wants to merge 3 commits into
masterfrom
cloudsmith-iduffy-remove-auth-token-flag

Conversation

@cloudsmith-iduffy

@cloudsmith-iduffy cloudsmith-iduffy commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove the deprecated --token / -t option from cloudsmith auth and authenticate
  • remove its warning, legacy token-creation path, and token-specific mutual-exclusion handling
  • direct users to --request-api-key in the Unreleased changelog while preserving existing --json and --force behavior

Testing

  • env -u CLOUDSMITH_WORKSPACE -u CLOUDSMITH_ORG pytest -q cloudsmith_cli/cli/tests/commands/test_auth.py
  • pre-commit run --files CHANGELOG.md cloudsmith_cli/cli/commands/auth.py cloudsmith_cli/cli/tests/commands/test_auth.py

Stack layer 1; targets master.

@cloudsmith-iduffy cloudsmith-iduffy changed the title Remove deprecated auth token option Remove deprecated auth token flags Sep 2, 2026
@cloudsmith-iduffy cloudsmith-iduffy changed the title Remove deprecated auth token flags Remove deprecated auth token option Sep 2, 2026
@cloudsmith-iduffy
cloudsmith-iduffy marked this pull request as ready for review September 3, 2026 08:40
@cloudsmith-iduffy
cloudsmith-iduffy requested a review from a team as a code owner September 3, 2026 08:40
Copilot AI lite review requested due to automatic review settings September 3, 2026 08:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes the deprecated cloudsmith auth --token/-t flow from the CLI authentication command, simplifying the SSO/auth surface area and steering users to the newer --request-api-key behavior.

Changes:

  • Removed the deprecated --token/-t Click option, warning text, and legacy token-creation invocation path from cloudsmith auth / authenticate.
  • Updated CLI tests to expect --token to be rejected as an unknown option.
  • Added an Unreleased changelog note directing users to --request-api-key.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
cloudsmith_cli/cli/commands/auth.py Drops the deprecated --token option and related logic from the auth command while keeping --request-api-key flow intact.
cloudsmith_cli/cli/tests/commands/test_auth.py Adjusts tests to reflect that --token no longer exists as an option.
CHANGELOG.md Documents the removal of cloudsmith auth --token in the Unreleased notes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +326 to +331
def test_token_option_is_rejected(self, runner):
"""Verify the removed --token option is rejected."""
result = runner.invoke(authenticate, ["--token"])

assert result.exit_code != 0
assert (
"--request-api-key cannot be used with --token or --force" in result.output
)
assert "No such option '--token'" in result.output
Comment thread CHANGELOG.md
Comment on lines 14 to 18
### Changed

- `cloudsmith domains list` now includes the Workspace slug in a `workspace` field.
- Removed `cloudsmith auth --token`; use `--request-api-key` instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants