fix(auth/status): handle rejected refresh token without an empty-toke… · cli/cli@93ab2cf · GitHub
Skip to content

Commit 93ab2cf

Browse files
babakksCopilot
andauthored
fix(auth/status): handle rejected refresh token without an empty-token request
When a refresh token was rejected, the stored credential was removed during resolution and buildEntry carried on with an empty token, sending the scope request with "Authorization: token " and surfacing a confusing generic failure with a blank token source. Short-circuit on RefreshStatusExpired: skip the scope request, set a dedicated refresh_expired entry state with a clear reason and re-authenticate instruction, and return early. The token source is left empty on purpose because the credential is gone and where it used to live is of no use to the user now. Add text and JSON pinning tests covering the rejected-refresh path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac178b5a-5b62-49bd-9e83-4796c7ddec46
1 parent 604120a commit 93ab2cf

2 files changed

Lines changed: 66 additions & 3 deletions

File tree

‎pkg/cmd/auth/status/status.go‎

Lines changed: 26 additions & 3 deletions

‎pkg/cmd/auth/status/status_test.go‎

Lines changed: 40 additions & 0 deletions

0 commit comments

Comments
 (0)