Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aaed64484c | ||
|
|
2e3ee350ca |
@@ -15,9 +15,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.2.1-beta.6</string>
|
||||
<string>1.2.1-beta.7</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>54</string>
|
||||
<string>55</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>13.0</string>
|
||||
<key>LSUIElement</key>
|
||||
|
||||
@@ -38,7 +38,7 @@ struct LoginWebView: NSViewRepresentable {
|
||||
|
||||
// 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 hasAnyCookie = cookies.contains { $0.domain.contains("claude.ai") }
|
||||
let hasAnyCookie = cookies.contains { $0.domain.contains("claude.ai") || $0.domain.contains("anthropic.com") }
|
||||
guard hasAnyCookie, !self.didAuthenticate else { return }
|
||||
self.didAuthenticate = true
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
|
||||
@@ -43,7 +43,7 @@ class UsageViewModel: ObservableObject {
|
||||
|
||||
private func checkInitialSignInState() async {
|
||||
let cookies = await WKWebsiteDataStore.default().httpCookieStore.allCookies()
|
||||
let hasAnyCookie = cookies.contains { $0.domain.contains("claude.ai") }
|
||||
let hasAnyCookie = cookies.contains { $0.domain.contains("claude.ai") || $0.domain.contains("anthropic.com") }
|
||||
if hasAnyCookie { isSignedIn = true }
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class UsageViewModel: ObservableObject {
|
||||
let store = WKWebsiteDataStore.default()
|
||||
let types = WKWebsiteDataStore.allWebsiteDataTypes()
|
||||
let records = await store.dataRecords(ofTypes: types)
|
||||
let claudeRecords = records.filter { $0.displayName.contains("claude.ai") }
|
||||
let claudeRecords = records.filter { $0.displayName.contains("claude.ai") || $0.displayName.contains("anthropic.com") }
|
||||
await store.removeData(ofTypes: types, for: claudeRecords)
|
||||
UserDefaults.standard.removeObject(forKey: "claude_org_id")
|
||||
isSignedIn = false
|
||||
@@ -109,6 +109,7 @@ class UsageViewModel: ObservableObject {
|
||||
checkLimitNotifications(for: limits)
|
||||
} catch AppError.notAuthenticated {
|
||||
isNotAuthenticated = true
|
||||
isSignedIn = false
|
||||
errorMessage = "Not signed in"
|
||||
} catch let error as DecodingError {
|
||||
switch error {
|
||||
@@ -192,7 +193,7 @@ class UsageViewModel: ObservableObject {
|
||||
|
||||
private func claudeCookieHeader() async -> String? {
|
||||
let cookies = await WKWebsiteDataStore.default().httpCookieStore.allCookies()
|
||||
let claudeCookies = cookies.filter { $0.domain.contains("claude.ai") }
|
||||
let claudeCookies = cookies.filter { $0.domain.contains("claude.ai") || $0.domain.contains("anthropic.com") }
|
||||
return HTTPCookie.requestHeaderFields(with: claudeCookies)["Cookie"]
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
[](https://swift.org)
|
||||
[](https://github.com/superdooper86/claudechecker/releases)
|
||||
[](LICENSE)
|
||||
[](https://github.com/superdooper86/claudechecker/releases/tag/v1.2.1-beta.5) <!-- BETA_BADGE -->
|
||||
[](https://github.com/superdooper86/claudechecker/releases/tag/v1.2.1-beta.6) <!-- BETA_BADGE -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
+3
-1
@@ -6,4 +6,6 @@
|
||||
- Fixed login window auto-closing before the user could sign in — the login window now correctly loads the `/login` page so it only detects auth after the actual sign-in redirect
|
||||
- Fixed "No API key configured" showing after signing out — now correctly shows "Not signed in" with a prompt to sign in
|
||||
- Added `/api/organizations` as a final fallback for org ID resolution when the bootstrap API response doesn't include it
|
||||
- Fixed usage data not loading after sign-in — API requests now include required browser-like headers (Origin, Referer, User-Agent) that Claude's usage endpoints require
|
||||
- Fixed usage data not loading — API requests now include required browser-like headers (Origin, Referer, User-Agent)
|
||||
- Fixed sign-in detection and cookie handling for accounts whose session cookies are on the `anthropic.com` domain rather than `claude.ai`
|
||||
- Fixed Settings incorrectly showing "Signed in" after a failed refresh — sign-in state now resets when authentication fails
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.2.1-beta.5",
|
||||
"url": "https://github.com/superdooper86/claudechecker/releases/download/v1.2.1-beta.5/ClaudeChecker.zip",
|
||||
"notes": "## What's new in v1.2.1\n\n### Bug fixes\n- Fixed \"Not signed in\" showing incorrectly on launch when the session was already active\n- Sign-in state is now detected immediately from stored cookies on startup, before the first data refresh completes\n- Fixed login window auto-closing before the user could sign in — the login window now correctly loads the `/login` page so it only detects auth after the actual sign-in redirect\n- Fixed \"No API key configured\" showing after signing out — now correctly shows \"Not signed in\" with a prompt to sign in\n- Added `/api/organizations` as a final fallback for org ID resolution when the bootstrap API response doesn't include it"
|
||||
"version": "1.2.1-beta.6",
|
||||
"url": "https://github.com/superdooper86/claudechecker/releases/download/v1.2.1-beta.6/ClaudeChecker.zip",
|
||||
"notes": "## What's new in v1.2.1\n\n### Bug fixes\n- Fixed \"Not signed in\" showing incorrectly on launch when the session was already active\n- Sign-in state is now detected immediately from stored cookies on startup, before the first data refresh completes\n- Fixed login window auto-closing before the user could sign in — the login window now correctly loads the `/login` page so it only detects auth after the actual sign-in redirect\n- Fixed \"No API key configured\" showing after signing out — now correctly shows \"Not signed in\" with a prompt to sign in\n- Added `/api/organizations` as a final fallback for org ID resolution when the bootstrap API response doesn't include it\n- Fixed usage data not loading after sign-in — API requests now include required browser-like headers (Origin, Referer, User-Agent) that Claude's usage endpoints require"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user