File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import LocalAuthentication
33import React
44import Security
55import CryptoKit
6+ import CryptoTokenKit
67
78@objc ( ReactNativeBiometrics)
89class ReactNativeBiometrics : RCTEventEmitter {
@@ -826,6 +827,8 @@ class ReactNativeBiometrics: RCTEventEmitter {
826827 biometricsError = . userCancel
827828 } else if errorCode == errSecAuthFailed {
828829 biometricsError = . authenticationFailed
830+ } else if errorCode == TKError . Code. corruptedData. rawValue {
831+ biometricsError = . keyAccessFailed
829832 } else {
830833 biometricsError = . signatureCreationFailed
831834 }
@@ -1009,6 +1012,8 @@ class ReactNativeBiometrics: RCTEventEmitter {
10091012 biometricsError = ReactNativeBiometricsError . userCancel
10101013 } else if errorCode == errSecAuthFailed {
10111014 biometricsError = ReactNativeBiometricsError . authenticationFailed
1015+ } else if errorCode == TKError . Code. corruptedData. rawValue {
1016+ biometricsError = ReactNativeBiometricsError . keyAccessFailed
10121017 } else {
10131018 biometricsError = ReactNativeBiometricsError . signatureCreationFailed
10141019 }
You can’t perform that action at this time.
0 commit comments