Claude Code Login or Authentication Error
How to troubleshoot Claude Code login loops, OAuth errors, expired sessions, 403 Forbidden, and provider credential problems.
Claude Code login errors usually come from an expired local session, account or organization access, browser OAuth callback issues, unsupported region, or cloud-provider credentials when using Bedrock, Vertex, or Foundry.
First Checks
- Run
/loginagain if Claude Code starts. - If you see OAuth or
403 Forbidden, confirm the account, organization, and region are allowed. - If browser login fails in SSH, WSL, or a container, copy the callback URL manually when prompted.
- For API, Bedrock, Vertex, or Foundry setups, verify environment variables and provider credentials.
- Use
/doctororclaude doctorto separate login problems from install problems.
When To Escalate
If the same account works in the browser but fails in the CLI, capture the exact error message, your install method, shell, operating system, and whether a proxy or VPN is involved.
Related Pages
- Claude Code troubleshooting hub
- Invalid API key
- Unable to connect to API
- Claude Code API reference hub
- Usage limits FAQ