Claude Code Authentication & OAuth Errors

First identify the active credential and the exact failure. A temporary authentication-service outage, a revoked OAuth session, an invalid API key, and cloud-provider credentials require different fixes; repeatedly logging in cannot repair all four.

10428 related issues · 2377 open · 8051 resolved · peaked at 2525 open (2026-07)

Authentication triage

What to do now

  1. Identify the active credential: Run /status in Claude Code, or claude auth status in a terminal, and note whether the session uses a Claude account, an API key, or Bedrock, Vertex AI, or Foundry credentials.
  2. Separate service failures from local credentials: For “Authentication service was unavailable,” check Anthropic service status and retry after the incident clears. For a 401, revoked token, or expired token, continue with a clean re-authentication.
  3. Refresh a revoked or expired OAuth session: Run /login. If the same error returns in that session, run /logout first, close Claude Code, restart it, and complete login again.
  4. Resolve credential precedence: If login succeeds but Claude Code still uses the wrong identity, check /status again. An ANTHROPIC_API_KEY or cloud-provider configuration can take precedence over subscription OAuth; change only the credential source you intend to use.

Reference: Claude Code authentication · Claude Code error reference · Login troubleshooting

Backlog trend over time

0 631 1263 1894 2525 2025-022025-082026-022026-08
2025-02 — First reports2026-07 — Peak backlog (2525 open)

The line shows how many issues in this topic were open at the end of each month, derived by counting each issue from its creation date until it was closed. First-party data from the anthropics/claude-code tracker.

Common questions

How do I fix “OAuth token revoked” in Claude Code?
Run /login to authenticate again. If the revoked-token error returns immediately, run /logout, close Claude Code, restart it, and complete a fresh login.
Why does Claude Code still reject me after login succeeds?
Claude Code may be using a different credential than the browser login. Use /status to identify the active method; an API key or cloud-provider configuration can take precedence over subscription OAuth.
What should I do when the authentication service is unavailable?
Treat it as a possible service incident first: check Anthropic status and retry after recovery. Clearing working credentials during an outage adds risk without fixing the upstream failure.

All authentication & login failures issues

Ranked by community engagement (reactions and comments).