Skip to content

todd-manning/biometric

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

biometric

This repository holds projects using biometrics. The first project is simply called biometric, and is based on Apple's LocalAuthentication framework. This command line program will prompt the user to authenticate on macOS using Touch ID. If the user fails Touch ID authentication, the reason for the failure will be displayed.

The code requires biometric authentication using policy LAPolicyDeviceOwnerAuthenticationWithBiometrics, which means that attempts to input the password will fail:

[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
                      localizedReason:myLocalizedReasonString
                                reply:^(BOOL success, NSError *error) {
                                    result = success ? kTouchIDResultAllowed : kTouchIDResultFailed;
                                    authError = error;
                                    CFRunLoopWakeUp(CFRunLoopGetCurrent());
                                }];

When running biometric from the terminal, the following Touch ID prompt is displayed: Touch ID Prompt

Here are examples of the kinds of output biometric will produce based on different authentication states. biometric return statuses

About

A repo for some experiments with biometrics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published