OAuth login: CLI times out waiting for callback despite successful browser authorization
Status Fixed / completed
Reported on v2.1.92
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 12 comments · opened Apr 6, 2026 · 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.
12 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
/v1/oauth/62bdd324-23cd-497e-af45-1ef019164a0b/authorize:1 Failed to load resource: the server responded with a status of 500 ()
4511-84f97842c4096e0e.js:12 [REACT_QUERY_CLIENT] QueryClient error: a: Internal server error
at n (5741-e0df12e868d24a1c.js:1:95179)
at 5741-e0df12e868d24a1c.js:1:100054
at async Object.mutationFn (5741-e0df12e868d24a1c.js:1:100872)
exactly same issue here.
Same
same here
Switch to vscode ext, it seems working for now
Same, running Claude Code under Linux.
same issue
same
working now
Additional data point: macOS — no 15s timeout, but same “browser OK / CLI not logged in” failure
On macOS, Claude Max, Claude Code 2.1.92 (npm global), after \
claude auth login\:claude auth status --text\returns Not logged in (not always a visible timeout — session never persists).claude\still shows API Usage Billing and Not logged in · Please run /login.OAuth URL from CLI includes \
redirect_uri=https://platform.claude.com/oauth/code/callback\.Repro hygiene: Avoid \
alias claude='claude --bare'\during repro (\command claude\or remove alias).Strongly overlaps with #44585 (login success then immediate “not logged in”). Posting here to tie macOS + non-timeout variant to this callback/persistence thread.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.