From b2c138f6654140dea570a9e95b68929d9bc9d8bb Mon Sep 17 00:00:00 2001 From: SuperDooper <37051355+superdooper86@users.noreply.github.com> Date: Mon, 11 May 2026 08:58:02 +0200 Subject: [PATCH] fix: detect auth by any claude.ai cookie, not specific cookie names --- ClaudeChecker/LoginView.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ClaudeChecker/LoginView.swift b/ClaudeChecker/LoginView.swift index 3f39035..3e1a057 100644 --- a/ClaudeChecker/LoginView.swift +++ b/ClaudeChecker/LoginView.swift @@ -36,12 +36,10 @@ struct LoginWebView: NSViewRepresentable { if let url = webView.url?.absoluteString, url.contains("/login") || url.contains("/auth") { return } + // URL is not a login/auth page, so if any claude.ai cookie exists we're signed in WKWebsiteDataStore.default().httpCookieStore.getAllCookies { cookies in - let hasSession = cookies.contains { - $0.domain.contains("claude.ai") && - ($0.name == "sessionKey" || $0.name == "__Secure-next-auth.session-token") - } - guard hasSession, !self.didAuthenticate else { return } + let hasAnyCookie = cookies.contains { $0.domain.contains("claude.ai") } + guard hasAnyCookie, !self.didAuthenticate else { return } self.didAuthenticate = true DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { self.onAuthenticated()