leecrossley / cordova-plugin-touchid

Cordova / PhoneGap Touch ID Plugin for Apache Cordova >= 3.0.0
http://ilee.co.uk
98 stars 38 forks source link

Expanding on CheckSupport #20

Open briananderson1222 opened 8 years ago

briananderson1222 commented 8 years ago

Since this is the only plugin i've come across that provides some sort of LocalAuthentication wrapper curious if the checkSupport method could be somewhat expanded to check for general device authentication that could potentially cover this use case: http://stackoverflow.com/questions/21337563/programmatically-detect-whether-ios-passcode-is-enabled-or-not. In my particular use case I would like to know if any sort of security (passcode, touchid) has been implemented on the device.

briananderson1222 commented 8 years ago

@leecrossley I can add a PR for this if this functionality would be desired. Just would want to know what the syntax would look like: touchid.checkSupport(successCallback, notSupportedCallback, anySecurity:boolean); where if anySecurity is true we check for LAPolicyDeviceOwnerAuthentication else we assume we are only looking for LAPolicyDeviceOwnerAuthenticationWithBiometrics

I know it doesn't completely fall within the title of this plugin, but could be a useful feature for anyone else hoping to leverage the LocalAuthentication framework without having to build out a whole separate plugin