File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Sources/StytchCore/StytchClient/Biometrics Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ public extension StytchClient {
115115 }
116116
117117 if parameters. shouldEvaluatePolicyOnRegister == true {
118+ LocalAuthenticationContextManager . laContext = LAContext ( )
119+ LocalAuthenticationContextManager . updateLaContextStrings ( strings: parameters. promptStrings)
118120 guard try await LocalAuthenticationContextManager . localAuthenticationContext. evaluatePolicy ( parameters. accessPolicy, localizedReason: parameters. promptStrings. localizedReason) else {
119121 throw StytchSDKError . biometricAuthenticationFailed
120122 }
@@ -164,10 +166,11 @@ public extension StytchClient {
164166 guard let privateKeyRegistrationQueryResult: KeychainQueryResult = try keychainClient. getQueryResults ( item: . privateKeyRegistration) . first else {
165167 throw StytchSDKError . noBiometricRegistration
166168 }
169+ LocalAuthenticationContextManager . laContext = LAContext ( )
170+ LocalAuthenticationContextManager . updateLaContextStrings ( strings: parameters. promptStrings)
167171 guard try await LocalAuthenticationContextManager . localAuthenticationContext. evaluatePolicy ( . deviceOwnerAuthenticationWithBiometrics, localizedReason: parameters. promptStrings. localizedReason) else {
168172 throw StytchSDKError . biometricAuthenticationFailed
169173 }
170- LocalAuthenticationContextManager . updateLaContextStrings ( strings: parameters. promptStrings)
171174
172175 try copyBiometricRegistrationIDToKeychainIfNeeded ( privateKeyRegistrationQueryResult)
173176
You can’t perform that action at this time.
0 commit comments