Share Extension: remove the legacy single-account keychain item on clear

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Ayushya Amitabh
2026-10-06 19:59:38 -04:00
co-authored by Claude Sonnet 5.5
parent a37524e959
commit 27c8ac12f2
+6
View File
@@ -96,5 +96,11 @@ enum SharedAccountStore {
static func clear() { static func clear() {
SecItemDelete(baseQuery() as CFDictionary) SecItemDelete(baseQuery() as CFDictionary)
// The first version kept a single account under its own service name;
// don't leave that credential behind.
var legacy = baseQuery()
legacy[kSecAttrService as String] = "dev.ayushya.noo.shared-account"
legacy[kSecAttrAccount as String] = "active"
SecItemDelete(legacy as CFDictionary)
} }
} }