[BUG] Can't authenticate on individual account - OAuth error
Resolved 💬 29 comments Opened Mar 11, 2026 by nathan-brainkey Closed May 20, 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?
I started getting this API error:API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid authentication credentials"},"request_id":"req_011CYwY9t9tKpSCeLPocnPwm"}
· Please run /login
When I run /login and open the browser, and click Authorize, I get the you're all set message but the console shows this message:
<img width="298" height="120" alt="Image" src="https://github.com/user-attachments/assets/cce76401-490c-48b2-88c2-216150e467a5" />
What Should Happen?
Claude Code should successfully log in after following the normal authentication workflow.
Error Messages/Logs
PI Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing
token."},"request_id":"req_011CYwXr8pSYMayAt1kUj4hq"} · Please run /login
OAuth error: timeout of 15000ms exceeded
Steps to Reproduce
- /login
- open browser
- click authorize
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
v2.1.72
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
29 Comments
same
OAuth error: timeout of 15000ms exceeded
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
@claude kick someone shiny metal a** to fix that
Same here.
Workaround for Claude Cli timeout issues on Windows (I am able to login now)
What I did:
Located the global npm install folder: C:\Users\<yourname>\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\
The main file is cli.js (it's minified so it's one giant unreadable line). Find and replace the hardcoded timeout values:
timeout:15000 → timeout:45000
AbortSignal.timeout(15000) → AbortSignal.timeout(45000)
That's it. Just save the file and restart claude cli.
OAuth error: Request failed with status code 500
same problem: v2.1.72, macOS Tahoe 26.3.1
Same issue. Can't do anything - not logging in even though paying for the subscription. Tried to do this multiple times, different browsers etc..
see https://status.claude.com/
Nice @doctorfarhan - I had codex do this on my mac based off what you did and was able to get it working: I fixed this on macOS by patching the Claude Code binary at
~/.local/share/claude/versions/2.1.72, replacingtimeout:15000withtimeout:45000andAbortSignal.timeout(15000)withAbortSignal.timeout(45000), then re-signing it with ad-hoccodesign. After that, login worked.Glad it worked on Mac too! Cheers!
Same problem
Well even with that, I got 500
It started to work for me I did run the older binary thought
~/.local/share/claude/versions/2.1.70try /logout and then /login again. it worked for me
Doing /logout and /login for me didn't help. It takes me to the https://claude.ai/oauth/authorize, which seems to have really high latency after I click "Authorize", and then the Claude Code CLI throws an error that the deadline was exceeded.
Claude Code is unusable for me atm, and it seems that claude.ai is down right now? :(
A bug here is that we, the purchasers of this product, cannot set the OAuth timeout. This should be updated ASAP. This is such an amazing oversight and very disappointingly bad coding.
logout and login for me fix the problem
I think it's a global problem. We have all the same error at the same time, it seems a internal server error.
It work for me too.
it's working for me on macOs Tahoe 26.3.1
data = data.replace(b'timeout:15000', b'timeout:45000')
I found a workaround for this issue. I used the binary from a previous version (2.1.50), which can be found in ~/.local/share/claude/versions. I logged in using that version, and once the authentication was successful, I was able to switch back and use the latest version (2.1.72) without any problems."
@renavides nice workaround. Got it to work with 2.1.63.
This approach worked for me -
claude setup-token- It will launch an authorization screen on the browser. Authorize it. You will see a token printed on your terminal.claude/loginand authorize in the browser. It should work now.Earlier, I was getting error 500 and sometimes a timeout error.
This is the sort of work-around that should be more widely known. Clearly Claude Code will accept a "code", but there wasn't good information about how to get a code that could be added.
This sounds silly and it might not apply to everyone, but I had a stale auth token set in my start up config in my terminal. Since I use VSCode with my
fishterminal, it was also loading this invalid Auth token.VSCode requires a restart to reload environment variables so...
export CLAUDE_CODE_AUTH_TOKEN="...",set -x CLAUDE_CODE_AUTH_TOKEN "..."and the like from any of your terminal startup scripts.claude setup-token, etcSome may not have
~/.local/share/claude/versions/2.1.72just do execute claude and /logout, will begin from scratch login works probablyClosing for now — inactive for too long. Please open a new issue if this is still relevant.
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.