Biometric Authentication

Perform biometric authentication using the device preferred authentication methods: FaceID, Fingerprint or PIN code.

BiometridStandard.getInstance().startAuthentication(callback: callback, options: options)
Parameter
Description

callback: ProcessCallback

Process callback

options: AuthenticationOptions?

Options to customize the authentication view

Implementation example

import UIKit
import BiometridStandardSDK

class ViewController: UIViewController, ProcessCallback {
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    @IBAction func startAuthenticationBtn(_ sender: Any) {
        BiometridStandard.getInstance().startAuthentication(callback: self)
    }

    func authenticationCallback(status: Bool, error: Errors?) {
        if error != nil {
            print(error?.rawValue)
            return
        }
        print("status", status)
    }
}

Callback params

status: Bool?

The status of the authentication

error: Errors?

Errors associated enum

Was this helpful?