Skip to content

Cordova Plugin for biometry (TouchID and FaceID) keychain access for iOS

License

Notifications You must be signed in to change notification settings

chidov/cordova-plugin-biometry-keychain-access

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-biometry-keychain-access

This plugin aim to provides a single and simple interface for accessing keychain from iOS devices using biometrics verification.

API Usage

Check Biometrics Availablity

In order to access and persist data to your keychain using biometrics verification, you will need to check whether your device is available with biometry.

window.plugins.keychain.isAvailable(
  function(type) {alert(type)}, // success callback: biometrics type 'face' or 'touch'
  function(error) {alert(msg)} // error callback: biometrics.not_available
);

Has Keychain

Check whether key existed

window.plugins.keychain.has(
'cdov', // key
function(){alert(true)}, // success callback
function(error){alert(error)} // error callback: user.not_found
);

Save data to Keychain

window.plugins.keychain.save(
'cdov', // key
'password', // data
true, // authentication required if true will required biometrics verification to perform this operation
function(){alert(true)}, // success callback
function(error){alert(error)} // error callback: user.not_found
);

Verify biometrics and retrive data from keychain

window.plugins.keychain.verify(
'cdov', // key
'message', // authentication UI prompted message
function(data){alert(data)}, // success callback: with data return
function(error){alert(error)} // error callback
);

Delete data from keychain

window.plugins.keychain.delete(
'cdov', // key
function(){alert(true)}, //success callback
function(error){alert(error)} //error callback
);

About

Cordova Plugin for biometry (TouchID and FaceID) keychain access for iOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published