Skip to main content

Biometric Authentication

If the physical device supports biometric authentication it can be used to authenticate into a Device and to decide Operations

Enable Biometric authentication

//context: must be previously authenticated
trustFactorClient.enableBiometricAuthentication(pin: <String>, context: <LAContext>) { result, correlationId in
switch result {
case .failure(let error):
// handle error

case .success(_):
// handle success
}
}

Authenticate

trustFactorClient.authenticate(context: <LAContext>) { result, correlationId in
switch result {
case .failure(let error):
// handle error

case .success(_):
// handle success
}
}

Disable

Disabling biometric authentication does not require the Device to be authenticated but it's important to update the device as soon as the user authenticates via PIN.

try trustFactorClient.disableBiometricAuthentication()