claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Can not login

Open cherishh opened this issue 8 months ago • 4 comments

Environment

  • Platform (select one):
    • [x] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [ ] Other:
  • Claude CLI version: 1.0.17
  • Operating System: macOS 15.4.1 (24E263)
  • Terminal: Warp

Bug Description

Login with method Anthropic Console account fails with message: OAuth error: Cannot read properties of undefined (reading 'organization_type') I've setup organization already. I can see that I have a Organization ID on console page. No matter how many times I retry, same issue comes up. I login via Google account. Have tried delete .claude & .claude.json

Steps to Reproduce

  1. in terminal, type in claude
  2. [connection check ok]
  3. Choose text style: Dark mode
  4. Choose login methd: Anthropic Console account
  5. Browser opens up
  6. Clike authorize & wait
  7. Browser shows success: 'You’re all set up for Claude Code.You can now close this window.'
  8. Terminal shows error: OAuth error: Cannot read properties of undefined (reading 'organization_type')

Expected Behavior

Successfully login.

Actual Behavior

Shows error: OAuth error: Cannot read properties of undefined (reading 'organization_type')

Additional Context

cherishh avatar Jun 08 '25 09:06 cherishh

Thanks for your report. There is a fix that should roll out in the next version. In the meantime, to work around this error, try going to console.anthropic.com to initialize an org for your account.

dicksontsai avatar Jun 08 '25 18:06 dicksontsai

Thanks for your report. There is a fix that should roll out in the next version. In the meantime, to work around this error, try going to console.anthropic.com to initialize an org for your account.

I believe I’ve already initialized my organization, I remember seeing a setup button and going through it. Now, on the organization page, I only see some basic org info and a toggle for “Allow creating new API keys in default workspace.”

Is there another way to work around this issue?

cherishh avatar Jun 10 '25 09:06 cherishh

Can you try running security delete-generic-password -a $USER -s "Claude Code-credentials" to clear your broken OAuth token?

dicksontsai avatar Jun 10 '25 15:06 dicksontsai

Can you try running security delete-generic-password -a $USER -s "Claude Code-credentials" to clear your broken OAuth token?

Thx for the quick response. I tried the command you provide, got result security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain. And I've checked my Google Password Manager, also no record of Claude Code. Guess I'll just wait for the next version.

cherishh avatar Jun 11 '25 01:06 cherishh

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.

github-actions[bot] avatar Aug 10 '25 14:08 github-actions[bot]