Skip to content

Commit

Permalink
Merge pull request #145 from savelichalex/master
Browse files Browse the repository at this point in the history
Add modern keys to control keychain access.
  • Loading branch information
mCodex authored Apr 11, 2019
2 parents 28fa85c + f7eb22b commit abf6b3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export enum RNSensitiveInfoAccessControlOptions {
'kSecAccessControlTouchIDAny',
'kSecAccessControlTouchIDCurrentSet',
'kSecAccessControlUserPresence',
'kSecAccessControlBiometryAny',
'kSecAccessControlBiometryCurrentSet',
}

export enum RNSensitiveInfoAttrAccessibleOptions {
Expand Down
6 changes: 6 additions & 0 deletions ios/RNSensitiveInfo/RNSensitiveInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ CFStringRef convertkSecAttrAccessible(NSString* key){
if([key isEqual: @"kSecAttrAccessibleAlwaysThisDeviceOnly"]){
return kSecAttrAccessibleAlwaysThisDeviceOnly;
}
if ([key isEqual: @"kSecAccessControlBiometryAny"]) {
return kSecAccessControlBiometryAny;
}
if ([key isEqual: @"kSecAccessControlBiometryCurrentSet"]) {
return kSecAccessControlBiometryCurrentSet;
}
return kSecAttrAccessibleWhenUnlocked;
}

Expand Down

0 comments on commit abf6b3e

Please sign in to comment.