Claude Desktop App stuck in login loop with 'Invalid authorization' error
Open 💬 29 comments Opened Feb 3, 2026 by 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
- App launches and immediately gets
Invalid authorizationon every API query account_profiledata is undefined — profile cannot be fetchedFailed to fetch (claude.ai)— network requests to claude.ai fail- Magic link login returns
login_link_not_foundorlogin_link_already_used - CSP violation blocks requests to
https://a-api.anthropic.com/v1/m - Cookies DB shows a
pendingLogincookie but no session/auth cookie is ever created - The app gets stuck on the login page (
https://claude.ai/login?returnTo=%2Fmagic-link)
Steps to Reproduce
- Open Claude Desktop App on macOS
- App shows login screen
- Enter email, receive magic link
- Click magic link — app briefly loads then falls back to
Invalid authorization - 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
- #20016 (Cowork tab stuck / Invalid authorization)
- #18474 (Claude Cowork stuck on 'sending request')
- #10503 (Invalid bearer token persists after login)
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.
29 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Also having the same issue with the Desktop App. Browser and Code work fine
+1 - Having issues with desktop app.
+1
Likewise
same
Just got the same issue today.
+1 for me on Claude Mac OS Desktop App, Am in version 1.1.3189(1b7b58) keep on looping on the cloudflare login page, browser works fine, restarted the machine still its same.
Followed the below steps, and its working fine now,
Fix for Cloudflare login loop — preserving Cowork chats
Had the same issue (macOS, Cloudflare verification loop, app-specific — browser worked fine). Things that didn't work: changing DNS to Google (8.8.8.8), flushing DNS cache, tethering to mobile hotspot, deleting only Caches/Preferences/SavedState, or selectively clearing auth files (Cookies, Session Storage, Local Storage, etc.).
What did work was wiping
~/Library/Application Support/Claude— but with a backup step to preserve Cowork local chats:No need to uninstall the app, restart the Mac, or re-download. All Cowork chat history was preserved.
Confirming @alexis-alem's solution works.
I have the same issue with ssh into remote instance.
Can confirm @alexis-alem's solution works.
Similar problem with Claude Code (CC) terminal frontend on Linux:
claudeComplete purge and reinstallation did not help.
Deleting and recreating the Team seat did not help.
Support request to support@mail.anthropic.com is answered by a clueless bot. After a couple of iterations, the bot mentioned the possibility of human intervention and fell silent. Now waiting since 10 days for a human @ Anthropic to respond.
I had to install CLI version of the Claude in a terminal and run login there, then it started working in VS code,
Solution to my endless log-in logged-out loop, https://github.com/anthropics/claude-code/issues/22685#issuecomment-4030150382:
There was an environment variable CLAUDE_CODE_OAUTH_TOKEN. Removing it solved the problem.
The lack of a clear error message is a severe bug of Claude Code.
Looks like there might be a regression in v1.1.7203 (034f07) — 2026-03-17.
The app fails to clear the sessionKey cookie on logout, causing an auth loop on re-login.
Environment
Reproduction
Log sequence from ~/Library/Logs/Claude/main.log
This cycle repeats indefinitely. The app detects an account, attempts OAuth, finds no valid session cookie, gets 403,
logs out, and starts over.
Workaround:
Deleting the cookie store breaks the loop:
```
Quit Claude Desktop first
rm ~/Library/Application\ Support/Claude/Cookies
rm ~/Library/Application\ Support/Claude/Cookies-journal
Relaunch and log in
This solution did not work for me.
I have
Claude 1.1.7714 (3bd6f6) 2026-03-19T14:50:53.000Z
I'm hesitant to
rm -rf ~/Library/Application\ Support/Claudebecause my Claude Code CLI is still working. I don't know if it shares anything in the same directory. But Claude Desktop is still in login loop after deleting the cookies and cookies-journal.What do your logs look like during the loop?
~/Library/Logs/Claude/main.logVery strange. I waited 30mins and Claude Desktop is running again without the infinite login loop 🤯
Running
unset CLAUDE_CODE_OAUTH_TOKENdid the trick for me. Very frustrating bug.This is happening for me on Windows. https://github.com/anthropics/claude-code/issues/59803
I've tried the following, and all failed to resolve:
I was also experiencing this issue on Windows and Firefox.
After trying a few things that didn't work, I was finally able to resolve it on this machine by disabling the ClearURLs browser extension. turns out having this extension enabled prevents secure links from working.
OMG this works finally, save my day!!
this solved my issue too, thanks!
That helps! I successfully verified my account after disabling all the extensions that might have VPN functionality.
I am having this issue as well.
Several other people observed that removing the "CleanURLs" browser extension resolved this problem, which I have also confirmed. This has been confirmed to be a bug in CleanURLs. Issue https://github.com/ClearURLs/Addon/issues/510 is tracking the bug and PR https://github.com/ClearURLs/Addon/pull/514 has been opened to fix it: please go upvote those.