Skip to content

Commit 7854eb8

Browse files
mikepitreclaude
andcommitted
fix(expo): clear AuthView's remembered identifier on an iOS scope change
AuthView keeps the typed identifier and the last-used identifier type in UserDefaults, so a new storage scope still showed the previous run's email. Android already drops them with clerk_preferences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d1ac3f2 commit 7854eb8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎integration/templates/expo-native/modules/verify-launch-config/ios/VerifyLaunchConfigModule.swift‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import Security
33

44
public class VerifyLaunchConfigModule: Module {
55
private static let storageScopeKey = "VerifyLaunchConfig.storageScope"
6+
private static let clerkDefaultsKeys = [
7+
"authStartIdentifier",
8+
"authStartPhoneNumber",
9+
"authStartPhoneNumberFieldIsActive",
10+
"clerk_last_used_identifier_type",
11+
]
612

713
public func definition() -> ModuleDefinition {
814
Name("VerifyLaunchConfig")
@@ -21,6 +27,7 @@ public class VerifyLaunchConfigModule: Module {
2127
}
2228

2329
SecItemDelete([kSecClass: kSecClassGenericPassword] as CFDictionary)
30+
Self.clerkDefaultsKeys.forEach(defaults.removeObject(forKey:))
2431
defaults.set(scope, forKey: Self.storageScopeKey)
2532
}
2633
}

0 commit comments

Comments
 (0)