OAuth login: CLI times out waiting for callback despite successful browser authorization
Resolved 💬 12 comments Opened Apr 6, 2026 by battibimmer96 Closed Apr 28, 2026
Description
After clicking "Authorize" in the browser, the OAuth flow completes successfully (browser shows success page), but the CLI times out waiting for the callback and never completes authentication.
Environment
- Claude Code version: 2.1.92
- OS: macOS
- Install method: npm (global)
- Browser: Default browser
Steps to Reproduce
- Run
claude auth login - Browser opens the OAuth authorization page
- Click "Authorize" — browser shows success
- CLI shows:
Login failed: timeout of 15000ms exceeded
What I've tried
claude auth logout+claude auth loginrm -rf ~/.claude/auth*- Different browsers (Safari, Chrome)
- Incognito window
- Disabling firewall
- Manually copying the OAuth URL
claude update(already on latest 2.1.92)
Errors observed
- First attempts:
OAuth error: Request failed with status code 500 - Later attempts:
OAuth error: Request failed with status code 400 - Browser authorization page once showed: "Autorizzazione non riuscita - Internal server error"
- Most attempts: browser succeeds but CLI times out
Expected Behavior
CLI should receive the OAuth callback and complete authentication after browser authorization succeeds.
Additional Context
The --no-browser flag is not available in this version. A manual code-paste flow (like other CLI tools offer) would help work around this issue.
This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗