beta.15: only detect auth when back on claude.ai, not on OAuth provider pages

This commit is contained in:
SuperDooper
2026-05-11 11:42:24 +02:00
parent c9912f8463
commit 7a4975fa3e
+3
View File
@@ -39,6 +39,9 @@ struct LoginWebView: NSViewRepresentable {
func checkCurrentURL(_ url: String?) {
guard !didAuthenticate, let url else { return }
// Ignore navigations to external OAuth providers (Google, etc.)
// only consider auth complete when we land back on claude.ai/anthropic.com
guard url.contains("claude.ai") || url.contains("anthropic.com") else { return }
if url.contains("/login") || url.contains("/auth") { return }
didAuthenticate = true
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {