fix(auth): complete anthropic oauth login#218
Conversation
Start the localhost callback listener before opening the browser and allow re-authentication when stored credential refresh fails.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAnthropic OAuth login now has an exported browser flow backed by shared callback-server infrastructure. Claude terminal login uses the common OAuth provider path, while credential readiness and callback behavior receive focused tests. ChangesOAuth login flow
Estimated code review effort: 3 (Moderate) | ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/auth/oauth_codex.go`:
- Line 258: Update oauthCallbackServer.Close to return an error, propagate
Shutdown failures as a contextual oops error, and make all callers handle the
returned error. When graceful shutdown ends due to timeout or cancellation,
force-close any remaining connections before returning, while preserving normal
graceful shutdown behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f90c1dbc-420c-4f98-9427-eae4e8ecd59e
📒 Files selected for processing (6)
internal/auth/oauth_anthropic.gointernal/auth/oauth_anthropic_internal_test.gointernal/auth/oauth_codex.gointernal/auth/oauth_errors_internal_test.gointernal/terminal/auth_commands.gointernal/terminal/auth_commands_internal_test.go
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #218 +/- ##
==========================================
+ Coverage 84.67% 84.77% +0.09%
==========================================
Files 313 313
Lines 28701 28731 +30
==========================================
+ Hits 24304 24357 +53
+ Misses 3025 3005 -20
+ Partials 1372 1369 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



Start the localhost callback listener before opening the browser and allow re-authentication when stored credential refresh fails.