feat: add cdcx auth login browser-based OAuth#48
Open
troycdc wants to merge 1 commit into
Open
Conversation
Adds a new `auth login` subcommand that authenticates via browser OAuth flow — opens the exchange broker authorization page, polls for credentials, and stores them in the config file with deduplication support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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
cdcx auth logincommand that opens browser for OAuth authentication against the Crypto.com Exchange broker APIaccount-{N})skip_serializing_iffor emptyenvsinProfileConfigto keep TOML cleanChanges
crates/cdcx-cli/src/groups/auth_login.rs— new module (implementation + 33 unit tests)crates/cdcx-cli/Cargo.toml— adduuid,open,crossterm,reqwestdepscrates/cdcx-cli/src/cli_builder.rs— registerloginsubcommand underauthcrates/cdcx-cli/src/main.rs— wire dispatchcrates/cdcx-core/src/config.rs—skip_serializing_if = "HashMap::is_empty"on envs fieldTest plan
cargo buildcompiles cleanlycargo test -p cdcx-cli— 121 tests pass (33 new)cargo clippy— no warningscdcx auth login→ select env → browser opens → complete OAuth → credentials storedcloses #49
🤖 Generated with Claude Code