Skip to content

Commit

Permalink
Fixed TouchID bypass #67
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Oct 29, 2018
1 parent d521216 commit 2d407b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-touch-id",
"version": "3.3.2",
"version": "3.4.0",
"description": "Scan the fingerprint of your user with the TouchID sensor, or the user's Face with Face ID on iPhone X",
"cordova": {
"id": "cordova-plugin-touch-id",
Expand Down
4 changes: 2 additions & 2 deletions src/ios/TouchID.m
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ - (BOOL) createKeyChainEntry {
SecAccessControlRef accessControlRef = SecAccessControlCreateWithFlags(
kCFAllocatorDefault,
kSecAttrAccessibleWhenUnlockedThisDeviceOnly,
kSecAccessControlBiometryAny,
2, // either kSecAccessControlBiometryAny (iOS 11.3+) or kSecAccessControlTouchIDAny (iOS < 11.3),
&accessControlError);
if (accessControlRef == NULL || accessControlError != NULL)
{
Expand All @@ -203,7 +203,7 @@ - (BOOL) createKeyChainEntry {
}

attributes[(__bridge id)kSecAttrAccessControl] = (__bridge id)accessControlRef;
attributes[(__bridge id)kSecUseNoAuthenticationUI] = @YES;
attributes[(__bridge id)kSecUseAuthenticationUI] = @YES;
// The content of the password is not important.
attributes[(__bridge id)kSecValueData] = [@"dummy content" dataUsingEncoding:NSUTF8StringEncoding];

Expand Down

0 comments on commit 2d407b4

Please sign in to comment.