[BUG] Log in via OAuth is far too frail
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?
When I try to authenticate my login, either on my personal account or company SSO, I and other colleagues are met with this frustrating exercise where the "Authorize" page appears for a brief instant before automatically redirecting to the onboarding page.
When I've been able to get past this on my personal account I am met with the next obstacle, either something like so:
Failed to authenticate. API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CZFhX468npdpSc4zPYSX6"}
The OAuth token can't expire after just thirty seconds.
or it just makes me login in via email again.
What Should Happen?
This workflow is incredibly annoying, and it happened to me in January on my personal account and again to several of my colleagues just yesterday. There are other bugs about this and you haven't really fixed it; if you give me a link to paste in my browser it should just take me to the authorization page without immediately punting me to onboarding.
This seems like a very basic thing and the fact you haven't addressed it reflects poorly on your product.
Error Messages/Logs
Steps to Reproduce
Just try to log in with your account on Claude CLI or any extension as if you were doing it for the first time.
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
Any
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗