Created
December 16, 2016 09:53
-
-
Save marchbold/117232c7e5134894af53e3b83ea5dbd0 to your computer and use it in GitHub Desktop.
Local Authentication with a user's fingerprint (TouchID) using the LocalAuth ANE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (LocalAuth.service.canAuthenticateWithFingerprint()) | |
{ | |
// Fingerprint authentication is available | |
LocalAuth.service.addEventListener( LocalAuthEvent.AUTH_SUCCESS, authSuccessHandler ); | |
LocalAuth.service.addEventListener( LocalAuthEvent.AUTH_FAILED, authFailedHandler ); | |
LocalAuth.service.authenticateWithFingerprint( "Unlock access to locked feature" ); | |
} | |
private function authSuccessHandler( event:LocalAuthEvent ):void | |
{ | |
trace( "localAuth_authSuccessHandler" ); | |
} | |
private function authFailedHandler( event:LocalAuthEvent ):void | |
{ | |
trace( "localAuth_authFailedHandler: " + event.errorCode + "::" +event.message ); | |
} | |
// com.distriqt.LocalAuth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://airnativeextensions.com/extension/com.distriqt.LocalAuth