[BUG] OAuth Authorize button returns 500 Internal Server Error — cannot login to Claude Code in VSCode

Resolved 💬 21 comments Opened Apr 6, 2026 by Ttuandatt Closed May 17, 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?

OAuth token expired in Claude Code (VSCode extension). When clicking the Authorize button on the OAuth page, the server returns a 500 Internal Server Error. Authentication never completes and Claude Code remains unusable.

The page briefly flashes "Build something great. You're all set up for Claude Code." before showing "Authorization failed — Internal server error", suggesting the flow partially completes on the browser side but fails on Anthropic's backend.

What Should Happen?

Clicking "Authorize" should complete the OAuth flow, return a token to Claude Code, and allow normal usage to resume.

Error Messages/Logs

Terminal:

API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."}}
Please run /login

OAuth error: timeout of 15000ms exceeded


Browser console (all browsers: Chrome, Edge):

POST https://claude.ai/v1/oauth/eb81b55e-f1e4-4a57-bad1-92e8b1dd60bd/authorize 500 (Internal Server Error)

Failed to load resource: the server responded with a status of 405 ()

[REACT_QUERY_CLIENT] QueryClient error: a: Internal server error
    at n (5741-e0df12e868d24a1c.js:1:95179)
    at 5741-e0df12e868d24a1c.js:1:100054
    at async Object.mutationFn (5741-e0df12e868d24a1c.js:1:100872)

Steps to Reproduce

  1. Use Claude Code in VSCode until OAuth token expires (~4 days)
  2. Claude Code prompts to re-authenticate with 401 error
  3. Run /login or claude auth login in terminal
  4. Browser opens the OAuth authorize page at https://claude.ai/oauth/authorize?code=true&client_id=9d1c250a-e61b-44d9-88ed-5944d1962f5e&...
  5. Click the Authorize button
  6. Page shows "Authorization failed — Internal server error"
  7. Terminal shows OAuth error: timeout of 15000ms exceeded

Workarounds attempted (all failed):

  • Tried on Chrome, Edge (different browsers)
  • Tried in Incognito mode
  • Deleted ~/.claude.json and ~/.claude/ then retried
  • Logged out of claude.ai on browser then re-logged in before authorizing
  • status.anthropic.com shows no incidents

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown — worked before token expiry (5 hours ago)

Claude Code Version

v2.1.76

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

The OAuth endpoint POST /v1/oauth/{session-id}/authorize is returning 500 on Anthropic's server side. This is not reproducible to a specific browser or local config — the error originates from Anthropic's backend. The issue blocks all Claude Code usage until re-authentication is possible.

View original on GitHub ↗

21 Comments

Ttuandatt · 3 months ago

"Claude Code welcome screen correctly identifies the account (Claude Pro, Opus 4.6) but any actual API call immediately returns 401. This suggests the session/token metadata is cached locally but the token itself is expired and cannot be refreshed due to the server-side 500 error on the authorize endpoint."

AlainPilon · 3 months ago

Same issue here.

zeon01 · 3 months ago

same issue here

cli-ish · 3 months ago

Yeah auth server is down for me too.

yasinatesim · 3 months ago

same issue. I can't log into my account.

dmateus-patra · 3 months ago

Login is timing out. Sometimes I get http 500, sometimes the process completes but very late (>15 seconds).

gabrielrbeiro · 3 months ago

same issue

mike-prokhorov · 3 months ago

Да, у всех так
Сервер компании упал

mike-prokhorov · 3 months ago

Ждем решения проблемы от разработчиков

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

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

jasonwhite123 · 3 months ago

Same here

sbluemin · 3 months ago

Ha....

headofthetable · 3 months ago

Same issue. Running Claude Code v2.1.92 on Mac. Max plan.

Even chat messages with the claude chat bot on the web ui (claude.ai) are not working for me either — even though I am logged in, able to navigate, and able to see chats.

I love how productive my productivity tool is making me this morning!

dylanlore · 3 months ago

Claude Code v2.1.92 same issue

mike-prokhorov · 3 months ago

Если у человечества кончится инетрент они будут также удивлены как если у человечества кончится cloude code)))

fernando-espinosa-clip · 3 months ago

same issue Claude Code v2.1.91

raman-pipko · 3 months ago

same

AlainPilon · 3 months ago

Seems like it is fixed now (at least for me)

github-actions[bot] · 1 month ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 9 days 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.