[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:

  1. After pasting the code from the browser, the CLI throws a timeout error even though the code was obtained successfully within a reasonable time.
  1. 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

  1. Run claude or claude login in the terminal
  2. Terminal prints an OAuth URL — open it in the browser
  3. Complete the login and copy the authorization code
  4. Paste the code back into the terminal when prompted
  5. See error: "timeout of 15000ms exceeded"
  6. Press Enter to retry
  7. 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

View original on GitHub ↗

47 Comments

cikorka · 3 months ago

Preflight Checklist

I have searched existing issues and this hasn't been reported yet

are you sure? 😅

yongkiyoon · 3 months ago

Same issue here

cpare · 3 months ago

Also impacted.

crestwood204 · 3 months ago

Me as well

Pithikos · 3 months ago

<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.

iv9eni · 3 months ago

Also impacted

ceelo404 · 3 months ago

THIS IS GETTING OLD!!! Fix the auth issues!

CodyJHeiser · 3 months ago

same issue here

SperoGottskraft · 3 months ago

same issue

rekahbeee · 3 months ago

same here

github-actions[bot] · 3 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/44252
  2. https://github.com/anthropics/claude-code/issues/33226
  3. https://github.com/anthropics/claude-code/issues/44267

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

sachinyadavv · 3 months ago

Same issue

goldmango · 3 months ago

Same

natgoud43 · 3 months ago

Same here

gakkiismywife · 3 months ago

same issue

miketalley · 3 months ago

same

quents · 3 months ago

same

yanus86 · 3 months ago

same issue - cannot use Claude Code in VS code

oystelan · 3 months ago

same issue when using terminal.

bing-zhub · 3 months ago

same issue here, cannot login. always OAuth error: timeout of 15000ms exceeded or OAuth error: Request failed with status code 500

markdbodman · 3 months ago

Seeing 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.

vetxi · 3 months ago

same here, not working neither in terminal nor in VS Code

gwentey · 3 months ago

Same issue !

Gravel4444 · 3 months ago

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.

judaortiz0212 · 3 months ago

Same issue here with visual studio code extension

gabrielvuksani · 3 months ago

Same issue here with Claude Code

clever-elephant · 3 months ago

Same issue here with Claude Code

taebow · 3 months ago

We need you Claude ! Please don't abandon us.

Bartimaeus96 · 3 months ago

same here, in the middle of research project, didn't know if I can hook my latest .md

heykiteretsu · 3 months ago

Yo, same issue here. just installed claude code v2.1.92 and geting this error.

Welcome to Claude Code v2.1.92
…………………………………………………………………………………………………………………………………………………………

     *                                       █████▓▓░
                                 *         ███▓░     ░░
            ░░░░░░                        ███▓░
    ░░░   ░░░░░░░░░░                      ███▓░
   ░░░░░░░░░░░░░░░░░░░    *                ██▓░░      ▓
                                             ░▓▓███▓▓░
 *                                 ░░░░
                                 ░░░░░░░░
                               ░░░░░░░░░░░░░░░░
       █████████                                        *
      ██▄█████▄██                        *
       █████████      *
…………………█ █   █ █………………………………………………………………………………………………………………

 OAuth error: Request failed with status code 500


 Press Enter to retry.
Bartimaeus96 · 3 months ago

<img width="447" height="395" alt="Image" src="https://github.com/user-attachments/assets/bd3eca0b-a478-4b5a-acbb-cd772bc80c7a" />

sdether · 3 months ago

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

WilcoPancras · 3 months ago

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.

Bartimaeus96 · 3 months ago

<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/#

aj-goldie · 3 months ago

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)

SperoGottskraft · 3 months ago

Try again, I just did 0951 PST and it looks like it's working

rekahbeee · 3 months ago
same here

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 sed approach doesn't work on macOS because:

  1. macOS sed requires sed -i '' syntax
  2. The Claude binary in 2.1.92 is a compiled Mach-O executable, not a JS file, so sed throws illegal byte sequence
  3. After patching, macOS Gatekeeper kills the process due to invalid code signature

Working fix for macOS:

# 1. Patch the timeout using perl (handles binary files)
perl -pi -e 's/timeout:15000/timeout:90000/g' ~/.local/share/claude/versions/2.1.92

# 2. Re-sign the binary (required or macOS will kill the process)
codesign --sign - --force ~/.local/share/claude/versions/2.1.92

# 3. Login
claude auth login

Tested on macOS with Claude Code 2.1.92. Hope this can help you as well!

CodyJHeiser · 3 months ago
same issue here

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" />

sdether · 3 months ago

working for me again as well

nnoble13 · 3 months ago

Not working again. timeout of 15000ms or 500 error

sfwill-dev · 3 months ago

Same here, timeout of 15000ms or 500 error.

mrsladoje · 3 months ago

Same here, 2nd day in a row

ciaranjmp · 3 months ago

Same here.

Mirarkitty · 3 months ago
Tested on macOS with Claude Code 2.1.92. Hope this can help you as well!

Worked for me on about the 10th attempt (linux). Thank you

instigate77 · 3 months ago

Having same issue on multiple systems (linux)

sullivan- · 3 months ago

This happened to me yesterday morning, and is happening again today.

Please fix.

LSH9132 · 3 months ago

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 :(

And now it work! what?