fix: keep API-key login out of OAuth code flow #22
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/api-key-login-waiting-state"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The API-key waiting state fell through into the OAuth code-entry branch:
Render displayed "paste the authorization code" for API-key logins, and
handleWaitingKey routed the submitted value to CompleteManualOAuth, which
failed with "no manual oauth flow in progress". The key was never stored
because the user was misdirected away from the browser form.
Introduce wantsCodeEntry(), true only for the browser-callback OAuth flows
(anthropic, openai-codex). API-key waiting now shows a browser-form hint,
ignores keystrokes, and places no cursor.
Regression tests:
Validation: gofmt clean; go test ./... pass; go test -race for
packages/agent/modes and packages/provider/auth pass; go vet ./... clean;
git diff --check clean.