[BUG] Claude Code login times out after successful OAuth browser flow
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Summary
Claude Code login consistently fails with:
Login failed: timeout of 15000ms exceeded
The browser-side OAuth flow appears to complete successfully, but Claude Code never finishes login.
Environment
- macOS
- Claude Code 2.1.72
- Max plan subscription
- Installed via npm
- VPN enabled
Reproduction
- Run:
claude auth login
- Browser opens successfully
- Complete login in the browser
- Claude Code still fails with:
Login failed: timeout of 15000ms exceeded
What I observed
- Browser OAuth succeeds
- I can see:
https://platform.claude.com/oauth/code/success?app=claude-codereturns200 OK- In an earlier flow, the localhost callback also completed successfully
- Despite that, Claude Code still times out after 15 seconds
What I already tested
- Reproduced with:
env -i HOME="$HOME" PATH="$PATH" SHELL="$SHELL" TERM="$TERM" /opt/homebrew/bin/claude auth login
- Cleared local auth/session state:
~/.claude/session-env~/.claude/cache- Removed Claude-related Keychain entry (
Claude Safe Storage) - Retried after fully restarting Claude Code
- Reproduced on latest Claude Code (
2.1.72) - Also reproduced after downgrading
- No OpenRouter/custom base URL/custom Anthropic env vars are present anymore
Notes
This looks like the browser-side auth succeeds, but the CLI/app never receives or processes the final authenticated state before timeout.
What Should Happen?
Expected behavior
After browser OAuth succeeds, Claude Code should complete login successfully.
Actual behavior
Browser OAuth appears to complete successfully, but Claude Code times out after 15 seconds and login fails.
Error Messages/Logs
Steps to Reproduce
- Open a terminal on macOS.
- Run:
claude auth login - Claude Code opens the browser to the Claude OAuth authorization page.
- Complete the login flow successfully in the browser.
- The browser reaches the Claude success page.
- Return to the terminal / Claude Code.
- Observe that Claude Code does not complete login and instead fails with:
Login failed: timeout of 15000ms exceeded
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.72(Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
34 Comments
2 hours, still not fixed.
I have the same issue
Same issue across all sessions. Multiple login attempts and nothing
Same issue, first happened 30 minutes ago. Upgrading to the latest version didn't help
I have been having the same issue all morning. I have tried using WSL, Ubuntu Linux, and Windows Command Prompt.
I was able to use Claude Code via Linux without problem 6 days ago.
Confirmed it's happening on Windows and Linux
same issue, only app work
Same issue, using VS Code with powershell, tried several times and unable to login.
Edit:
In the dev tools in chrome, the authorize and callback takes longer than 15 seconds failing the login, any way to override the timeout exceeded until this callback is optimized?
the same issue under linux
Guys fix this! this is annoying...
I can reproduce the same issue on Windows with Claude Code v2.1.71.
My behavior is very similar:
https://platform.claude.com/oauth/code/success?app=claude-code
OAuth error: timeout of 15000ms exceeded
I reproduced this in:
I also tried:
Same result every time.
So this appears to affect Windows as well, not only macOS.
Any fix or workaround for this issue? I am about to unsubscribe claude as unreliable.. older versions does not work also.
same here right now, working on windows, max plan
Same here. macos, max plan.
I am also seeing this issue on macos Tahoe across multiple browsers and terminal applications.
Same issue on Windows
This is likely a congestion/transient issue. I had the same issue, however, I have been able to login successfully now with no apparent fix to the code. Endpoints were testing healthy and both browser and desktop didn't have issues.
A backflow fix needs to be implemented to handle the peak times. There is a workaround for the timeout that was discovered in earlier issues.
nice all good now, thank you!
I have the same issue
FYI: going back to v2.1.66 solved the issue for me. No problem logging in.
OMGG :/ I didnt know this was happening for all of us cause i've been ripping my hair out last 2 hours, cursing everything and everyone who built claude. god i wish I'd seen this earlier, would've saved so much time without freaking myself out
Same thing here, the login page in the browser react too slowly and once it gets the auth we are already over 30sec(timeout 15s)
Root cause evidence: Cloudflare challenge race condition
I've captured the full OAuth flow through Burp Suite and can confirm the root cause. Filed as #33269 with full sanitized HTTP history.
TL;DR: The
/oauth/authorizeendpoint is behind Cloudflare Turnstile. The challenge takes 26 seconds to solve. The timeout is 15 seconds. Math doesn't work.Proof
| Time | Status | Notes |
|------|--------|-------|
| 17:10:45 | 403 |
Cf-Mitigated: challenge— no CF cookies || 17:10:47 | 403 | retry — still blocked |
| 17:10:56 | 403 | has
__cf_bmbut no clearance — blocked || 17:11:11 | 200 |
cf_clearanceobtained — 26s after first attempt |Direct proof from Docker:
Response body is Cloudflare's "Just a moment..." Turnstile page (7.9KB JS).
Why Burp Suite intercept accidentally fixes it: The human stepping through requests gives the browser unlimited time to solve the CF challenge, bypassing the 15s timeout race.
Full sanitized Burp capture (42 requests, all tokens redacted): https://gist.github.com/gyrusdentatus/350c95e768337c33024373137ebef96c
Until fix you can temporary install previous version:
$ curl -fsSL https://claude.ai/install.sh > install.sh
$ chmod 755 install.sh
$ ./install.sh 2.1.71
$ claude
(/login successful login)
For me reverting to 2.1.66 worked.
Edit:
Funnily enough after exiting and starting
claudeagain it picked up the latest version 2.1.72 but as it was authorized I was able to use it just fineThanks to @luxemque
works perfectly.
https://status.claude.com
lol this is lame … see issue I created https://github.com/anthropics/claude-code/issues/33269
why would you downgrade LMAO :D
sed -i 's/timeout:15000/timeout:90000/g' ~/.local/share/claude/versions/2.1.72is the only fix you need. NO DOWNGRADE lolI got this issue too, but restarting my machine fixed it.
Looks like it's fixed now !
Confirmed fixed in Claude Code 2.1.74. Closing this issue. Thanks for the fast fix.
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.