Skip to content

Claude Desktop App stuck in login loop with 'Invalid authorization' error #22685

Description

@SingCheung

Bug Description

Claude Desktop App (v1.1.1520) on macOS is unable to authenticate. Every launch immediately produces Invalid authorization errors from the REACT_QUERY_CLIENT. Login via magic link fails repeatedly. The app is completely unusable.

Environment

  • App version: 1.1.1520
  • Platform: macOS (darwin, arm64)
  • Node version: 22.21.1
  • CCD version: 2.1.22

Error Logs

From ~/Library/Logs/Claude/claude.ai-web.log:

2026-02-02 18:32:42 [error] [REACT_QUERY_CLIENT] QueryClient error: Error: Invalid authorization
2026-02-02 18:33:16 [error] [REACT_QUERY_CLIENT] QueryClient error: TypeError: Failed to fetch (claude.ai)
2026-02-02 18:33:16 [error] [REACT_QUERY_CLIENT] QueryClient error: Error: Invalid authorization
2026-02-02 19:03:43 [error] [REACT_QUERY_CLIENT] QueryClient error: Error: login_link_not_found
2026-02-02 19:38:50 [error] [REACT_QUERY_CLIENT] QueryClient error: Error: login_link_already_used
2026-02-02 20:37:40 [error] Refused to connect to 'https://a-api.anthropic.com/v1/m' because it violates the following Content Security Policy directive: "connect-src 'self' https://api.segment.io https://*.segment.io https://*.segment.com https://a-cdn.anthropic.com https://*.google.com https://*.facebook.com https://*.facebook.net https://*.doubleclick.net".
2026-02-02 20:37:40 [error] Fetch API cannot load https://a-api.anthropic.com/v1/m. Refused to connect because it violates the document's Content Security Policy.
2026-02-02 20:48:56 [error] [REACT_QUERY_CLIENT] QueryClient error: Error: ["account_profile"] data is undefined

These errors repeat on every app launch. The app was restarted 10+ times over ~3.5 hours with the same result every time.

Symptoms

  1. App launches and immediately gets Invalid authorization on every API query
  2. account_profile data is undefined — profile cannot be fetched
  3. Failed to fetch (claude.ai) — network requests to claude.ai fail
  4. Magic link login returns login_link_not_found or login_link_already_used
  5. CSP violation blocks requests to https://a-api.anthropic.com/v1/m
  6. Cookies DB shows a pendingLogin cookie but no session/auth cookie is ever created
  7. The app gets stuck on the login page (https://claude.ai/login?returnTo=%2Fmagic-link)

Steps to Reproduce

  1. Open Claude Desktop App on macOS
  2. App shows login screen
  3. Enter email, receive magic link
  4. Click magic link — app briefly loads then falls back to Invalid authorization
  5. All subsequent API calls fail

Troubleshooting Already Attempted (all failed)

  • Full quit and relaunch (10+ times)
  • Complete deletion of ~/Library/Application Support/Claude/ (cookies, local storage, session storage, config, caches, network state)
  • Deletion of ~/Library/Caches/Claude/
  • Deletion of ~/Library/Preferences/com.anthropic.claudefordesktop.plist
  • Deletion of ~/Library/Saved Application State/com.anthropic.claudefordesktop.savedState
  • Deletion of ~/Library/WebKit/ and ~/Library/HTTPStorages/ for Claude
  • defaults delete com.anthropic.claudefordesktop
  • Checked macOS Keychain — no Claude/Anthropic entries found
  • Tried logging in via browser first, then opening desktop app
  • Tried older versions of the app
  • No VPN or DNS filter active

Possibly Related Issues

Expected Behavior

App should authenticate successfully after clicking the magic link and display the main chat interface.

Actual Behavior

App is stuck in an infinite login loop. Auth token is never persisted. All API calls return Invalid authorization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions