[BUG] Claude Code login times out after successful OAuth browser flow

Resolved 💬 34 comments Opened Mar 11, 2026 by EmilienLiang Closed Mar 12, 2026

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

  1. Run:

claude auth login

  1. Browser opens successfully
  2. Complete login in the browser
  3. 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-code returns 200 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

  1. Open a terminal on macOS.
  2. Run: claude auth login
  3. Claude Code opens the browser to the Claude OAuth authorization page.
  4. Complete the login flow successfully in the browser.
  5. The browser reaches the Claude success page.
  6. Return to the terminal / Claude Code.
  7. 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_

View original on GitHub ↗

34 Comments

ManiruzzamanAkash · 4 months ago

2 hours, still not fixed.

eric9ba9119d-cpu · 4 months ago

I have the same issue

NerdBase-by-Stark · 4 months ago

Same issue across all sessions. Multiple login attempts and nothing

alex123012 · 4 months ago

Same issue, first happened 30 minutes ago. Upgrading to the latest version didn't help

christina-k-francis · 4 months ago

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.

hodor · 4 months ago

Confirmed it's happening on Windows and Linux

kealdoom · 4 months ago

same issue, only app work

samdaw13 · 4 months ago

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?

hululu75 · 4 months ago

the same issue under linux

rubmz · 4 months ago

Guys fix this! this is annoying...

jillboy-hash · 4 months ago

I can reproduce the same issue on Windows with Claude Code v2.1.71.

My behavior is very similar:

  • Browser OAuth flow completes successfully
  • Browser shows: “You’re all set up for Claude Code”
  • Final browser URL is:

https://platform.claude.com/oauth/code/success?app=claude-code

  • But Claude Code then fails locally with:

OAuth error: timeout of 15000ms exceeded

I reproduced this in:

  • Claude Code for VS Code
  • VS Code integrated terminal
  • Windows Command Prompt run as Administrator

I also tried:

  • deleting %USERPROFILE%\.claude and re-authenticating
  • reinstalling the VS Code extension
  • allowing claude.exe through Windows Firewall

Same result every time.

So this appears to affect Windows as well, not only macOS.

devmugi · 4 months ago

Any fix or workaround for this issue? I am about to unsubscribe claude as unreliable.. older versions does not work also.

yuntongSH · 4 months ago

same here right now, working on windows, max plan

tanthammar · 4 months ago

Same here. macos, max plan.

RyantHults · 4 months ago

I am also seeing this issue on macos Tahoe across multiple browsers and terminal applications.

qweerv · 4 months ago

Same issue on Windows

LilliDarling · 4 months ago

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.

LilliDarling · 4 months ago

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.

yuntongSH · 4 months ago

nice all good now, thank you!

Avancinni · 4 months ago

I have the same issue

luxemque · 4 months ago

FYI: going back to v2.1.66 solved the issue for me. No problem logging in.

msbygt · 4 months ago

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

fscanu · 4 months ago

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)

gyrusdentatus · 4 months ago

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/authorize endpoint 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_bm but no clearance — blocked |
| 17:11:11 | 200 | cf_clearance obtained — 26s after first attempt |

Direct proof from Docker:

$ curl -sS -D - -o /dev/null "https://claude.ai/oauth/authorize?..."
HTTP/2 403
cf-mitigated: challenge

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

GiumaSoft · 4 months ago

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)

samdaw13 · 4 months ago

For me reverting to 2.1.66 worked.

Edit:
Funnily enough after exiting and starting claude again it picked up the latest version 2.1.72 but as it was authorized I was able to use it just fine

ManiruzzamanAkash · 4 months ago

Thanks to @luxemque

npm uninstall -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-code@2.1.66

works perfectly.

diogommartins · 4 months ago
gyrusdentatus · 4 months ago
Thanks to @luxemque `` npm uninstall -g @anthropic-ai/claude-code ` ` npm install -g @anthropic-ai/claude-code@2.1.66 `` works perfectly.

lol this is lame … see issue I created https://github.com/anthropics/claude-code/issues/33269

why would you downgrade LMAO :D

gyrusdentatus · 4 months ago

sed -i 's/timeout:15000/timeout:90000/g' ~/.local/share/claude/versions/2.1.72 is the only fix you need. NO DOWNGRADE lol

muhua-h · 4 months ago

I got this issue too, but restarting my machine fixed it.

Charlottedoulcet · 4 months ago

Looks like it's fixed now !

EmilienLiang · 4 months ago

Confirmed fixed in Claude Code 2.1.74. Closing this issue. Thanks for the fast fix.

github-actions[bot] · 3 months ago

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.