Local Authentication
Authenticate users biometrically or with a passphrase they already know.
Overview
Many users rely on biometric authentication like Face ID, Touch ID, or Optic ID to enable secure, effortless access to their devices. As a fallback option, and for devices without biometry, a passcode or password serves a similar purpose. Use the LocalAuthentication framework to leverage these mechanisms in your app and extend authentication procedures your app already implements.
[Image]
To maximize security, your app never gains access to any of the underlying authentication data. You can’t access any fingerprint images, for example. The Secure Enclave, a hardware-based security processor isolated from the rest of the system, manages this data out of reach even of the operating system. Instead, you specify a particular policy and provide messaging that tells the user why you want them to authenticate. The framework then coordinates with the Secure Enclave to carry out the operation. Afterward, you receive only a Boolean result indicating authentication success or failure.
Topics
Essentials
Logging a User into Your App with Face ID or Touch IDAccessing Keychain Items with Face ID or Touch ID
Authentication and access
Persistence
Key pairs
Requirements
Authentication views
Errors
Reference
Classes
Variables
kLAAccessControlOperationCreateItemkLAAccessControlOperationCreateKeykLAAccessControlOperationUseItemkLAAccessControlOperationUseKeyDecryptkLAAccessControlOperationUseKeyKeyExchangekLAAccessControlOperationUseKeySignkLACompanionTypeMackLACompanionTypeNonekLACompanionTypeVisionkLACompanionTypeWatchkLAErrorCompanionNotAvailablekLAPolicyDeviceOwnerAuthenticationWithBiometricsOrCompanionkLAPolicyDeviceOwnerAuthenticationWithCompanion