[BUG] /login with pasting auth code doesn't work
Resolved 💬 2 comments Opened Aug 6, 2025 by adstastic Closed Aug 6, 2025
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.69
- Operating System: macOS 15.5 24F74
- Terminal: iTerm2 Build 3.5.14
Bug Description
/login from another machine (copying the URL and pasting the code) appears to work, but the CLI keeps showing the Missing API key · Run /login status message, and when sending messages Invalid API key · Please run /login.
Steps to Reproduce
- Update claude code
- Run
claude - See status message `Missing API key · Run /login
- Run
/login - Select
Claude account with subscription - Copy URL
- Load URL in an authenticated browser
- Click
Authorize - Copy auth code
- Paste into claude code
- See
Login successful. Press Enter to continue... - Press Enter
- Return to message box, with status message
Missing API key · Run /login## Expected Behavior
I expect this to work as it has in the past.
Actual Behavior
The logged out state persists despite several attempts.
Logging in via browser (not copy/paste token) works, but I am authenticating claude on a server where I don't want to auth my Google account for logging in to Anthropic.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗