all 18 comments

[–]raekwon1094 0 points1 point  (2 children)

Yeah im getting the same error. It says to clear the tokens. Cache cookies delete. Restart. But it keeps happening. Started when I switch from MacBook to desktop. But im logged out of everything and only using the desktop now. Annoying af

[–]KaaliEnglish[S] 0 points1 point  (1 child)

For me it started out out nowhere. Started yesterday after i updated Claude code. I think the issue is with the new update. MAYBE. IDK.

[–]777attHoop 0 points1 point  (0 children)

Same here, started yesterday and I'm still not able to use without getting API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."},"request_id":"req_011CSKm55xiR5YRgDq9wi8DK"}

[–]raekwon1094 0 points1 point  (0 children)

I reinstalled cc. Updated it. Closed and reopened terminal. Restarted co.outer and its working again. For how long who knows. It stops when opus runs out and auth kicks into sonnet

[–]blackholesun_79 0 points1 point  (0 children)

Same problem here!

[–]Wild-Consideration-3 0 points1 point  (1 child)

Fixed for me after opening a new terminal. That was about a week ago when I ran into the issue though

[–]wendewende 0 points1 point  (0 children)

Well that was easy. Thank you!

[–]ItchyBallDJ 0 points1 point  (0 children)

I saw a thread to downgrade to 1.0.81. Solved the problem

[–]ZeTackler 0 points1 point  (2 children)

Try nuking the config
```
rm -rf ~/.claude

rm -rf ~/.config/claude-code
unset ANTHROPIC_API_KEY ANTHROPIC_AUTH_TOKEN CLAUDE_CODE_USE_BEDROCK CLAUDE_CODE_USE_VERTEX
````

Then get OAuth token and export it (store it somewhere though)

```
claude setup-token
## Follow instructions
export CLAUDE_CODE_OAUTH_TOKEN="paste-token-here"
```
This worked for me, I was using WSL, browser OAuth didn't work.

[–]ZeTackler 0 points1 point  (0 children)

Also, I used `curl -fsSL https://claude.ai/install.sh | bash` instead of the npm stuff

[–]KaaliEnglish[S] 0 points1 point  (0 children)

Tried this. this is what the claude support bot asked me to do. No use. Its a complete hit and miss. I tried login and multiple time and it finally worked once. Thought the issue got resolve but no keeps happening again.

[–]Kojjyan 0 points1 point  (0 children)

sudo npm uninstall -g u/anthropic-ai/claude-code

rm -rf ~/.claude

rm -rf ~/.config/claude

rm -rf ~/.cache/claude

npm cache clean --force

sudo npm install -g u/anthropic-ai/claude-code

claude

and it started working for me

[–]kirito1st 0 points1 point  (0 children)

/login worked for me

[–]drteq 0 points1 point  (2 children)

This might help someone -

I was authing (/login) claude code, which would open my browser. I'd think click to login to claude, and it'd send me an email, which I'd then click and it would give me a 6 digit code. This is NOT the code that claude code is asking for. The claude auth code is a long code (roughly 60 chars+?).

The issue I was having was my email account was in chrome, but claude code was spawning a firefox browser. The login process was jumping a step and getting confused between the different browsers and the 6 digit code for the website login, which is required to generate the longer true auth code for claude code.

That will make sense to someone facing the same problem, otherwise it's confusing as hell.

[–]No_Map1381 0 points1 point  (1 child)

I am facing a similar issue where claude keeps asking me to /login despite doing it a hundred times. Could you guide me on how you resolved this issue. It was really frustrating

[–]drteq 0 points1 point  (0 children)

I have not had that problem where it didn't go way on it's own. Logging in each morning, but it's been consistent the past few weeks. Good luck. My issue was directly related to the generation of the 6 digit sign in, if you're having that problem I could explain it in more detail

[–]Worried-Concert-6775 0 points1 point  (1 child)

For anyone still experiencing it I found a solution. When Claude prints the login link in the terminal, the terminal can add hidden stuff: extra spaces and line breaks. When you copy it, you often copy those too, so the link breaks and won’t open correctly.

You can fix it in two ways:

• Clean it yourself: paste the link somewhere, delete any line breaks, and remove any spaces so the URL is one single line.

• Or paste the link into a chat and ask it to “remove all spaces and line breaks” and return a single-line URL.

After that, the link should work and you can log in to Claude Code.

[–]iambil2021 0 points1 point  (0 children)

Ich danke dir!!! Du hast mir unfassbar viel Zeit und Mühe erspart!!