Skip to content

Commit

Permalink
prevented ios UI from displaying when checking key existence
Browse files Browse the repository at this point in the history
  • Loading branch information
NappyPirate committed Feb 10, 2020
1 parent 6989b34 commit 704c49a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ios/ReactNativeBiometrics.m
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,12 @@ - (BOOL) biometricKeyExists {
NSDictionary *searchQuery = @{
(id)kSecClass: (id)kSecClassKey,
(id)kSecAttrApplicationTag: biometricKeyTag,
(id)kSecAttrKeyType: (id)kSecAttrKeyTypeRSA
(id)kSecAttrKeyType: (id)kSecAttrKeyTypeRSA,
(id)kSecUseAuthenticationUI: (id)kSecUseAuthenticationUIFail
};

OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)searchQuery, nil);
return status == errSecSuccess;
return status == errSecSuccess || status == errSecInteractionNotAllowed;
}

-(OSStatus) deleteBiometricKey {
Expand Down

0 comments on commit 704c49a

Please sign in to comment.