Claude Code OAuth flow redirects to /onboarding pricing page instead of /login - no way to authenticate existing Max subscriber

Resolved 💬 22 comments Opened Jan 19, 2026 by edwinpope Closed Jun 22, 2026

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?

The OAuth redirect goes to /onboarding with pricing plans instead of /login. That's Anthropic's code, their redirect logic, their UX decision. Google account priority is just salt in the wound - the real problem is:

No way to force email/password login in Claude Code CLI
OAuth redirects to onboarding instead of login for existing subscribers
No account switcher in the OAuth flow
No --account or --email flag to specify which account to use
Existing Max 5x subscribers get shown "Get Max plan" - that's broken
Cannot download chat history for auditing hallucinations in documentation

Steps to Reproduce:

Have multiple Google accounts in browser (personal Gmail + Google Workspace business account)
Have existing Max 5x subscription on personal Gmail account
Run claude in terminal
OAuth URL opens browser to claude.ai/onboarding
See pricing page with "Get Max plan" - no login option
Cannot authenticate with existing Max account
Expected Behavior:
OAuth should redirect to /login with account picker, not /onboarding pricing page

Environment:

Claude Code v2.1.12
Windows Server 2025
Installed via WinGet
Reproduced on multiple machines
Workarounds Attempted (all failed):

claude /logout
Deleted oauth:tokenCache from %APPDATA%\Claude\config.json
Cleared cookies in %APPDATA%\Claude\Network\
Manually navigating to /login redirects back to onboarding
Impact:
Paying Max 5x subscriber locked out of Claude Code CLI. Cannot use the product I'm paying for.

What Should Happen?

Claude should allow email access at all steps, no forcing OAuth. Take ownership of the login experience. There's more ways to fix this, ESPECIALLY when I am logged into the Desktop App successfully, but cannot get CLI to connect. Cannot get download of chat history for parsing.

Error Messages/Logs

Steps to Reproduce

Run claude in terminal
OAuth URL is generated: https://claude.ai/oauth/authorize?code=true&client_id=...
Browser opens to claude.ai/onboarding showing pricing plans (Free / Pro / Max)
No login option appears - only "Get Max plan" buttons
Cannot authenticate even though I already have a Max subscription

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude Code v2.1.12

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

I was able to get Claude Code CLI working on one other machine previously, but cannot reproduce whatever auth state made that work. The working machine still has OAuth but authenticates correctly - suggesting this is a session/state issue in the OAuth flow, not a fundamental account problem.

A simple fix would be adding a --email flag or respecting ANTHROPIC_API_KEY without requiring OAuth first.

View original on GitHub ↗

22 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/12379
  2. https://github.com/anthropics/claude-code/issues/17966
  3. https://github.com/anthropics/claude-code/issues/12383

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

edwinpope · 5 months ago

Those are not the same. This is Google OAuth locking as a login issue.

edwinpope · 5 months ago

Troubleshooting Attempted

Authentication & Credential Cleanup
  • [ ] Deleted ~/.claude directory completely
  • [ ] Deleted ~/.claude.json
  • [ ] Cleared browser cookies for claude.ai and anthropic.com
  • [ ] Cleared macOS Keychain entries for "Claude" / Windows Credential Manager
  • [ ] Tried /logout then /login cycle
  • [ ] Logged out of claude.ai in browser before attempting CLI auth
Network & Environment
  • [ ] Disabled VPN
  • [ ] Disabled firewall temporarily
  • [ ] Tested on different network (mobile hotspot vs home WiFi)
  • [ ] Verified localhost:PORT is accessible (curl http://localhost:PORT returns connection refused, which is expected before auth starts)
  • [ ] Checked for proxy settings (echo $HTTP_PROXY $HTTPS_PROXY)
  • [ ] Verified no other process binding to the callback port
Browser & Platform
  • [ ] Tried different browsers (Chrome, Firefox, Edge, Safari)
  • [ ] Tried incognito/private window
  • [ ] Manually disabled all browser extensions
  • [ ] Cleared browser cache entirely
  • [ ] Verified claude.ai login works normally in browser
Claude Code Specific
  • [ ] Reinstalled Claude Code completely (npm uninstall -g @anthropic-ai/claude-code && npm install -g @anthropic-ai/claude-code)
  • [ ] Tried specifying --login-method claude
  • [ ] Verified ANTHROPIC_API_KEY is NOT set in environment
  • [ ] Checked ~/.claude/settings.json for conflicting settings

Critical Differentiating Evidence

This issue is DISTINCT from the similar issues identified by GitHub Actions:

| Issue | Problem | Why This Is Different |
|-------|---------|----------------------|
| #12379 | Server-side session caching prevents account switching after Team→Personal switch | I have only ONE account, never switched. No credit exhaustion message. |
| #17966 | 401 error after re-auth causes silent model downgrade | I never complete auth at all - no 401, no model loading, just infinite redirect loop |
| #12383 | Desktop app shows "API Account" instead of "Max Account" after successful auth | I cannot complete authentication at all - never get to status check |

Additional related issues that are also different:

| Issue | Problem | Why This Is Different |
|-------|---------|----------------------|
| #5312 | Browser auto-redirects due to incomplete onboarding | My onboarding is complete - I use claude.ai daily without issues |
| #19078 | Token expires immediately after successful auth | I never receive a token - redirect loop prevents callback |
| #1484 | "OAuth account information not found in config" after browser shows success | Browser never shows "You're all set up" - redirects to homepage instead |

Key Evidence This Is a Different Bug

  1. Working on another machine: The exact same Claude Max account authenticates successfully on a different computer with Claude Code CLI, proving:
  • Account is valid
  • Subscription is active
  • OAuth flow CAN work
  1. No error state reached: Unlike other auth issues where users see error messages, my flow never progresses far enough to generate any error - it's a redirect loop before authorization even begins
  1. Browser redirect target is wrong:
  • Other issues: Redirect goes to localhost but code is invalid
  • My issue: Redirect goes to claude.ai homepage, completely bypassing localhost callback
  1. Session/state corruption suspected: The fact that one machine works and another doesn't, despite identical accounts and similar environments, suggests corrupted OAuth state on Anthropic's servers keyed to some machine identifier

Possible Root Causes

Based on analysis of related issues and OAuth flow debugging:

  1. Server-side state corruption: Anthropic's OAuth server may have stale/corrupted state associated with this device's identifier (browser fingerprint, IP, or cookie)
  1. Redirect URI mismatch: Server may be rejecting the localhost:PORT/callback redirect_uri silently and defaulting to homepage redirect
  1. OAuth state parameter validation failure: The state parameter generated by CLI may not match what the server expects, causing immediate redirect
  1. Rate limiting or security block: Too many auth attempts may have triggered a security mechanism that silently redirects instead of showing an error

Suggested Fix / Feature Request

  1. Add verbose OAuth debugging: claude --login --verbose should output:
  • Full OAuth URL being opened
  • Expected callback URL
  • Any responses received on callback server
  • Timeout information
  1. Support ANTHROPIC_API_KEY without OAuth: Allow users to bypass OAuth entirely by providing an API key:

```bash
export ANTHROPIC_API_KEY=sk-ant-...
claude # Should work without OAuth

Add --email flag: Allow specifying account email to help server-side disambiguation:

claude --login --email user@example.com

Clear server-side state: Provide a way to reset all OAuth state on Anthropic's servers for this account:

claude --reset-auth # Clears both local AND server-side state

mindreader · 5 months ago

This happens both on chromium as well as firefox. It means that I simply can't log into my company's enterprise account through oauth, period, and the only work arounds are to burn credits on the api, or try to get my company to provide a way to pay for a personal max account, or just not use claude at all.

edwinpope · 5 months ago

The best part is that even AFTER deleting Google Workspace, my Claude chat exports still will not download.

mindreader · 5 months ago

After working through this, the onboarding issue is that it seems that what claude code sends me to, claude.ai is completely different from platform.claude.com which is where my company's enterprise account is, but I apparently have accounts with the same email from both. Probably because I signed up before my company did. You can log in manually to the claude.ai account, say personal, and pick a free plan and get past the onboarding issue.

But that doesn't fix your problem, you still get sent to claude.ai to log in instead of platform.claude.com and you don't get to decide which one claude code sends you to. You can theoretically delete your claude.ai account, but mine demands that I "Contact Support". So I'm doing that, but who knows when support will get to it.

What I'm going to try next is to just make another email from scratch just for claude, to associate claude code to, one that definitely doesn't exist yet, so that I can just have one account, and theoretically that should work. Good luck.

bobir01 · 5 months ago

guys i am in ubuntu server without browser or gui, when i try to login claude pro, cc gives me url to login but when i copy and paste it in browser it has to give me some otp code, but
claude web portal is giving this error

<img width="1442" height="855" alt="Image" src="https://github.com/user-attachments/assets/c2968fdd-f339-4163-bfa5-3dc82781284b" />

edwinpope · 5 months ago

Had problems on homelab server with re installation of the desktop app, but got it up and running. Claude will login on that machine in CLI and in Desktop app. However, Oauth still will not properly recognize credentials for chat data downloads. My current work around is to download chat history from a different machine, load it onto my NAS and retrieve it from my homelab server for ingestion into my localized database.

I now will change service providers for my business email away from google and have things running -- just barely.

Still think this is worth some dev time to untangle, would have been nice to simply continue on with work instead of taking multiple days troubleshooting.

manufosela · 5 months ago

Ran /extra-usage, cancelled, now stuck in onboarding loop. Completing onboarding hangs on loading. Logout sends back to account creation. Only active CLI session still works." Asi los ingenieros ven que hay mas afectados con el mismo patron

cliffhall · 4 months ago

@ashwin-ant Inspector and Servers maintainer here.

I have an org-issued email address for a Claude seat on my client's org, and if I just go to platform.claude.com, I can log in just fine and get to the Claude screen. But with Claude Code OR Desktop, logging in sends me to claude.ai for OAuth, and that sends me down the path of "Set up a new account". Any hope of getting some love on this OAuth problem?

golproductions · 4 months ago

Damn, okay... I see exactly what's going on here. It's frustrating, but the real reason you're stuck in that onboarding hellscape isn't actually about Anthropic's pricing page logic or Google account priority. That's all downstream.
The engineering truth here is a fundamental disconnect in state management within the OAuth callback itself. Here's the physics of the bug:
The Claude CLI (the Client) initiates a standard OAuth code=true flow to claude.ai/oauth/authorize. Your browser (the User Agent) opens. But inside the authorization server, before it even redirects back to the CLI, it’s validating the pre-existing session state.
Because you have multiple Google accounts, and perhaps an stale cookie or unexpected session state (hence why workarounds didn't work), the auth server is making a flawed assumption. Instead of presenting the /login prompt or an account picker as expected, it’s seeing you as a new user who just happened to authenticate via Google. It’s prioritizing onboarding (getting you to subscribe) over re-authentication of an existing subscription. It's skipping the step that should link your successfully authed (but wrong) Google profile to your actual Max 5x subscriber ID.
The suggested patch correctly identifies this state management failure. To win next time, you need a way to explicitly force the auth server into a known, clean state, rather than allowing it to rely on existing browser cookies and ambiguous session signals.
You win next time when we implement --force-reauth logic or add a --hint-email flag. This would instruct the authorization server, during the initial handshake, to skip its internal session checks and explicitly demand user interaction (like an account picker or forcing a new email login). That forces the proper /login pathway and guarantees the correct state gets linked to your API token. You're effectively overriding the clever (but buggy) auto-onboarding optimization.

  • Fixed by GOL V1.1 ($1.2USD per call).
tipsypittsy · 4 months ago

I am a Max subscriber. Claude Code forced a reauthorisation that took me to the browse to re-authenticate. After verifying my email it now takes me to the ‘Create a new account’ page every time. I can still log in on my iPhone and iPad with the same email address but I cannot login to Claude on both my Mac Studio or MacBook. Support has not responded for over 72 hours. How are we supposed to develop business critical apps with flaws like this and support as bad as this? I need this to work urgently. Can you anyone help? Ticket number is #215473464909292

cliffhall · 3 months ago

BTW, this was reported on Windows, and is labeled as platform:windows but its happening on macOS as well.

bergarator · 3 months ago

Adding to this: same redirect-to-onboarding issue since March 17 outage. Pro subscriber, iOS app works fine, desktop login broken on all browsers/computers. See also #36797 which is the same bug reported 12 hours ago. This is clearly a recurring auth issue that needs urgent attention.

Abaddon-88 · 3 months ago

Manually skip onboarding in the config file

You can manually edit ~/.claude.json and set hasCompletedOnboarding to true to bypass the forced onboarding flow.

# Open (or create if it doesn't exist)
nano ~/.claude.json

Add/update the following content:

{
"hasCompletedOnboarding": true
}

worked for me. no redirect and authorization can finished

tipsypittsy · 3 months ago

OK, so I used Claude Code in API mode to fix this and it is so simple. I had been using Claude Chat on iOS for advice and it told me NOT to create a new account for fear of duplicating and/or overwriting my existing account, so i never did. Well claude code told me TO create a new account. So i did, i went through the onboarding steps and eventually returned to the chat window like nothing had happened. All my previous chats were there and Max plan all there. I then ran claude auth login and it worked.

Really bad UX though from claude's perspective. Shouldn't be telling users to 'Create a new account' when you are actually just agreeing a new ToS (according to Claude Code).

cliffhall · 3 months ago

Come on folks. Maybe point Claude Code / Opus 4.6 at this issue. Guarantee it will be fixed and we'll all be much happier.

StoryScaleAi · 2 months ago

+1 — same issue. Paying Max subscriber, locked out of desktop + web since April 24.
I know my Max subscription won’t move the needle, but I’m locked out of the product I’m paying for, so posting to help with pattern confirmation.

Sequence: logged in on personal Mac, attempted login on office desktop while first session was still active. The login attempt failed (routed to onboarding) and simultaneously the original Mac session was force-logged-out. Since then, all desktop/web logins fail the same way. Only mobile authenticates.

Troubleshooting: Google SSO, email magic link (same device), incognito, multiple browsers/devices, revoked Google access, cleared app data — all failed.

Support: Ticket #215474005792314 (3 days, no human response).

Looks like the same auth routing / account sync bug as #36797, #51002, and #51294. This pattern suggests a race condition during simultaneous session handling.

TornLux · 2 months ago

I'm experiencing the same problem with one of my accounts. I have two Max Plan accounts, which I currently use on two different computers. Today, one of my accounts was almost out of credit, and I wanted to switch to the other account. However, I found that clicking the magic link in the verification email redirects me to the account creation page, making it impossible to log in. After several unsuccessful attempts, I logged back into the account with the almost-out-of-credit account, and strangely, it logged in and worked normally. On the other computer, the problematic account also cannot log in via the web browser, but it works fine with the Claude Code CLI. I'm very frustrated now.

wrightalexc-sweepeace · 2 months ago

Same here — Max subscriber, macOS, locked out 15+ days after a Google password change. Identical symptoms: every sign-in redirects to /onboarding with email shown as verified, while the Android app and platform.claude.com still work. Full details in my comment on #57164. Adding myself to the count of affected paying customers.

cliffhall · 1 month ago

Folks, in case you're not watching it, this other similar issue is multiple users reporting that the path is to just proceed through the onboarding process and it will recognize your email and revert to your existing account. NOTE: I have not tried this, but here is the latest report: https://github.com/anthropics/claude-code/issues/36797#issuecomment-4472139958

github-actions[bot] · 24 days ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.