fix(auth): report per-environment status and refresh-token availability - #184
Merged
Conversation
`gddy auth status` with no --env returned an empty array: it enumerated environments via each PkceAuthProvider's in-memory token cache, which is always empty since a fresh provider is built per call. List every known environment instead (built-ins + locally configured + PAT registry) and let the dispatcher check status on each against real persisted storage. Also surfaces whether a cached credential has a refresh token on file (cli-engine 0.7's new Credential::refreshable), so status output can distinguish a credential that definitely needs `auth login` from one that will attempt a silent renewal first.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes gddy auth status environment enumeration so it reports per-environment status reliably (even when no --env is specified) by listing all known environments and letting status checks consult persisted credential storage. It also bumps cli-engine to v0.7 to pick up Credential::refreshable, enabling auth status output to distinguish credentials that can attempt silent refresh from those that require an interactive login.
Changes:
- Reworked
GoDaddyAuthProvider::list_environmentsto enumerate all known environments (built-ins + locally configured + PAT registry) instead of relying onPkceAuthProvider’s in-memory cache. - Updated dependency
cli-enginefrom0.6to0.7. - Regenerated lockfile entries for the dependency bump.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
rust/src/auth.rs |
Fixes environment discovery for auth status by listing known env names and including PAT-registered envs. |
rust/Cargo.toml |
Bumps cli-engine to 0.7 to support Credential::refreshable. |
rust/Cargo.lock |
Updates locked cli-engine version/checksum to match the dependency bump. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
qcai-godaddy
approved these changes
Aug 4, 2026
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
gddy auth statuswith no--envreturned an empty array — it enumerated environments via eachPkceAuthProvider's in-memory token cache, which is always empty since a fresh provider is built per call. Now lists every known environment (built-ins + locally configured + PAT registry) and lets the dispatcher check status against real persisted storage.cli-engineto 0.7, picking upCredential::refreshable(feat(auth)!: surface refresh-token availability on Credential/auth status cli-engine#79) soauth statusoutput can distinguish a credential that definitely needsauth loginfrom one that will attempt a silent renewal first.Test plan
cargo checkcargo clippy -- -D warningscargo test(494 passed)cargo fmt --checkgddy auth statusreports per-environment status with an accuraterefreshablecolumn