[BUG] OAuth login fails with 500 error and 15s timeout — cannot authenticate via browser flow
Open 💬 47 comments Opened Apr 6, 2026 by Joshtri
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?
The OAuth browser login flow fails in two ways, making it impossible to authenticate:
- After pasting the code from the browser, the CLI throws a timeout error even though the code was obtained successfully within a reasonable time.
- On retry, a server-side 500 error appears when fetching user roles, which is completely out of the user's control.
What Should Happen?
After opening the OAuth URL in the browser, copying the code, and pasting it into the terminal, the authentication should complete successfully and the user should be logged in.
Error Messages/Logs
OAuth error: timeout of 15000ms exceeded
Press Enter to retry.
OAuth error: Failed to fetch user roles: Request failed with status code 500
Steps to Reproduce
- Run
claudeorclaude loginin the terminal - Terminal prints an OAuth URL — open it in the browser
- Complete the login and copy the authorization code
- Paste the code back into the terminal when prompted
- See error: "timeout of 15000ms exceeded"
- Press Enter to retry
- See error: "Failed to fetch user roles: Request failed with status code 500"
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.92 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
- Location: Indonesia — network latency may be a contributing factor to the timeout
- The 15-second timeout window appears too short for real-world use, especially on slower connections
- The 500 error on "fetch user roles" suggests an intermittent server-side issue
- Suggestion: increase the timeout to at least 60 seconds and add clearer error messages distinguishing server errors from timeout errors
47 Comments
Preflight Checklist
I have searched existing issues and this hasn't been reported yet
are you sure? 😅
Same issue here
Also impacted.
Me as well
<img width="1558" height="765" alt="Image" src="https://github.com/user-attachments/assets/8eb8082b-1681-4fb8-a6af-2a1883a86eb4" />
And not even possible to submit the issue via
/feedback.Maybe stop releasing garbage new features at warp-speed, and focus on stability for paying users? Just a thought.
Also impacted
THIS IS GETTING OLD!!! Fix the auth issues!
same issue here
same issue
same here
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Same issue
Same
Same here
same issue
same
same
same issue - cannot use Claude Code in VS code
same issue when using terminal.
same issue here, cannot login. always
OAuth error: timeout of 15000ms exceededorOAuth error: Request failed with status code 500Seeing issues here as well. Can't login with vs code, or console. I use Google ad the login credentials, and get error 500, or sometimes 401. Sometimes on anthropic site I get a failure, I retry and it says it's working, but it didn't on console or vs code.
same here, not working neither in terminal nor in VS Code
Same issue !
I have same issue.
claude make the bug report below.
Title: Claude Code VS Code Extension OAuth login fails with 401/500/timeout after Node.js reinstall on Windows
Environment:
OS: Windows 10 (26100.3194)
Claude Code Extension: v2.1.92
Node.js: v24.0.1
npm: v11.11.0
IDE: VS Code
Summary:
Claude Code VS Code extension worked fine until Node.js was reinstalled. After reboot, OAuth authentication consistently fails. The extension was working the day before with no config changes other than a Node.js installation.
Symptoms (in order of occurrence):
VS Code Output log: 401 - OAuth token has expired
After clearing auth: 500 - Internal Server Error during OAuth flow
CLI: OAuth error: timeout of 15000ms exceeded
After full config reset: Auth error: No API key available
Steps already attempted (all failed):
Uninstall & reinstall Claude Code VS Code extension
Full PC reboot
Cleared auth config: del %USERPROFILE%\.claude.json / rmdir /s /q %USERPROFILE%\.claude
Reinstalled Claude Code CLI: npm uninstall -g + npm install -g @anthropic-ai/claude-code
Ran claude auth login → browser opened → completed OAuth approval → returned "You are all set" → CLI still timed out with timeout of 15000ms exceeded
Set ANTHROPIC_API_KEY environment variable → VS Code restarted
Key observation:
Everything worked fine before Node.js was reinstalled. The issue began immediately after Node.js installation and system reboot. The OAuth browser flow appears to complete successfully on the browser side ("You are all set"), but the callback to the CLI times out, suggesting the local port/callback listener is not receiving the response.
Suspected cause:
Node.js reinstall may have changed PATH or port binding behavior, causing the OAuth callback listener to fail silently on Windows.
Same issue here with visual studio code extension
Same issue here with Claude Code
Same issue here with Claude Code
We need you Claude ! Please don't abandon us.
same here, in the middle of research project, didn't know if I can hook my latest .md
Yo, same issue here. just installed claude code v2.1.92 and geting this error.
<img width="447" height="395" alt="Image" src="https://github.com/user-attachments/assets/bd3eca0b-a478-4b5a-acbb-cd772bc80c7a" />
Same problem.. Either 500 or timeout, there is no option for a code, just the authorize button that spins for a while and then let's you try again. It usually eventually says it succeeds in the browser, but as soon as that pops up, the console reports a timeout failure
Same here, using Claude code in Pycharm, Ubuntu.
nslookup auth.anthropic.com fails with NXDOMAIN. (Also on 8.8.8.8.)
nslookup api.anthropic.com works, tho. But that's not what I need.
<img width="2048" height="1326" alt="Image" src="https://github.com/user-attachments/assets/453b95b1-624e-430a-bab6-c56195ef8d3b" />
it seems there are problems on their end, you can check this
https://status.claude.com/#
This is happening to me.
macOS: 15.7.4 (24G517)
It won't auth correctly to my "claude.ai Max" subscription, from:
Cursor (Identifier: anthropic.claude-code, Version: 2.1.92) or
Warp Terminal (v0.2026.04.01.08.39.stable_02)
Try again, I just did 0951 PST and it looks like it's working
Hey guys I was having the same problem and this guy @gyrusdentatus saved me with his post https://github.com/anthropics/claude-code/issues/33269.
For macOS users, here's an additional fix:
The standard
sedapproach doesn't work on macOS because:sedrequiressed -i ''syntaxsedthrowsillegal byte sequenceWorking fix for macOS:
Tested on macOS with Claude Code 2.1.92. Hope this can help you as well!
Appears to be working now for me after Claude status update https://status.claude.com/
<img width="948" height="622" alt="Image" src="https://github.com/user-attachments/assets/e25082da-8b98-48c9-8e79-1857170fecd3" />
working for me again as well
Not working again. timeout of 15000ms or 500 error
Same here, timeout of 15000ms or 500 error.
Same here, 2nd day in a row
Same here.
Worked for me on about the 10th attempt (linux). Thank you
Having same issue on multiple systems (linux)
This happened to me yesterday morning, and is happening again today.
Please fix.
I thought it was just a problem with my linux and while testing I ended up logging out of every single one.
debian, arch, windows, mac.. fix it plz :(