Commit Graph

6 Commits

Author SHA1 Message Date
William Valentin a00451a690 fix(auth): cancel OAuth callback server when flow is aborted
Add AbortSignal support to startCallbackServer and loginAnthropicOAuth
so that pressing Ctrl+C during the browser OAuth flow immediately closes
the HTTP server and 5-minute timer instead of leaving the process hung.

Wire up an AbortController in the TUI browser OAuth path so the cancel
callback aborts the signal on Ctrl+C.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 11:51:27 -08:00
William Valentin 7b9e1e6cba fix(auth): correct ternary indentation in openBrowser 2026-02-26 11:28:29 -08:00
William Valentin 57f08e7005 feat(auth): implement Anthropic OAuth PKCE browser flow
Add openBrowser, exchangeCodeForToken, and loginAnthropicOAuth to
src/auth/anthropic.ts, completing the full PKCE OAuth flow. Includes
5 new tests covering happy path, state mismatch, 403 subscription
error, 500 error, and missing access_token cases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 10:52:28 -08:00
William Valentin 82f09422d6 feat(auth): add PKCE helpers and OAuth callback server for Anthropic
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 10:32:13 -08:00
William Valentin 6375f56f67 auth: add Anthropic auth token storage 2026-02-15 10:27:32 -08:00
William Valentin 4bb8c88fbe feat(auth): add anthropic api key storage and cli auth 2026-02-14 00:43:12 -08:00