Platforms to show: All Mac Windows Linux Cross-Platform

LAContextMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class TouchBar MBS Mac64bit Plugin 17.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: The class for local authentication via password or TouchID.

Feedback, Comments & Corrections

Biometry Types

Constant Value Description
BiometryTypeFaceID 2 The device supports Face ID.
BiometryTypeNone 0 The device does not support biometry.
BiometryTypeTouchID 1 The device supports Touch ID.

Credential Types

Constant Value Description
CredentialTypeApplicationPassword 0 The credential type for an application password.
CredentialTypeSmartCardPIN 1 Smart card PIN provided by application.

If not set, LocalAuthentication will ask users for the smart card PIN when necessary. Applications can provide the PIN using setCredential method. In such case, LocalAuthentication will not show the smart card PIN user interface.
When entered from the LocalAuthentication user interface, the PIN is stored as UTF-8 encoded string.

Error Codes

Constant Value Description
kErrorAppCancel -9 Authentication was canceled by application (e.g. invalidate was called while authentication was in progress).
kErrorAuthenticationFailed -1 Authentication was not successful, because user failed to provide valid credentials.
kErrorBiometryLockout -8 Authentication was not successful, because there were too many failed Biometry attempts and Biometry is now locked. Passcode is required to unlock Biometry, e.g. evaluating PolicyDeviceOwnerAuthenticationWithBiometrics will ask for passcode as a prerequisite.
kErrorBiometryNotAvailable -6 Authentication could not start, because Biometry is not available on the device.
kErrorBiometryNotEnrolled -7 Authentication could not start, because Biometry has no enrolled fingers.
kErrorInvalidContext -10 LAContext passed to this call has been previously invalidated.
kErrorPasscodeNotSet -5 Authentication could not start, because passcode is not set on the device.
kErrorSystemCancel -4 Authentication was canceled by system (e.g. another application went to foreground).
kErrorTouchIDLockout -8 Authentication was not successful, because there were too many failed Touch ID attempts and Touch ID is now locked. Passcode is required to unlock Touch ID, e.g. evaluating PolicyDeviceOwnerAuthenticationWithBiometrics will ask for passcode as a prerequisite.
kErrorTouchIDNotAvailable -6 Authentication could not start, because Touch ID is not available on the device.
kErrorTouchIDNotEnrolled -7 Authentication could not start, because Touch ID has no enrolled fingers.
kErrorUserCancel -2 Authentication was canceled by user (e.g. tapped Cancel button).
kErrorUserFallback -3 Authentication was canceled, because the user tapped the fallback button (Enter Password).

Policies

Constant Value Description
PolicyDeviceOwnerAuthentication 2 Device owner is going to be authenticated by biometry or user password.

Touch ID or user password authentication is required. If Touch ID is not available, not enrolled or locked out, then the user is asked for password right away.

Touch ID authentication dialog behaves similarly as the one used by PolicyDeviceOwnerAuthenticationWithBiometrics. However, the "Use Password.." button does not end the authentication. Instead, it switches the authentication mechanism to user password.
PolicyDeviceOwnerAuthenticationWithBiometrics 1 The policy for owner authentication with biometrics.
PolicyDeviceOwnerAuthenticationWithBiometricsOrWatch 4 Device owner is going to be authenticated by biometry or Watch.

Watch or biometric authentication is required. If no nearby paired watch device can be found, it behaves as PolicyDeviceOwnerAuthenticationWithBiometrics. Similarly, if biometry is unavailable it behaves as PolicyDeviceOwnerAuthenticationWithWatch.

Watch authentication dialog looks and behaves similarly to biometric variant. When both mechanisms are available, user is asked to use biometry and watch authentication will run in parallel.
PolicyDeviceOwnerAuthenticationWithWatch 3 Watch authentication is required. If no nearby paired watch device can be found,
kErrorWatchNotAvailable is returned.

Watch authentication dialog looks and behaves similarly to the biometric variant. Users can confirm authentication by double-clicking the side button on their watch.

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine


The items on this page are in the following plugins: MBS Mac64bit Plugin.


Label   -   LargeBinaryStreamMBS

The biggest plugin in space...




Links
MBS FileMaker Plugins

Start Chat