TGFBiometricAuthenticatorDelegate

Objective-C

@protocol TGFBiometricAuthenticatorDelegate <NSObject>

Swift

protocol TGFBiometricAuthenticatorDelegate : NSObjectProtocol

A delegate protocol that an application can implement to customize the user experience for the proprietary biometric authenticator.

@since 1.0.0

  • Called by the SDK before presenting the Touch ID prompt, allowing the application to provide a custom message to be displayed in the dialog.

    Note

    This method is specific to Touch ID. The message for Face ID is configured via the NSFaceIDUsageDescription key in the application’s Info.plist.

    Declaration

    Objective-C

    - (NSString *_Nonnull)
        biometricAuthenticatorTouchIdMessagePromptForOperationInfo:
            (nonnull TGFFido2OperationInfo *)operationInfo;

    Swift

    func biometricAuthenticatorTouchIdMessagePrompt(_ operationInfo: TGFFido2OperationInfo) -> String

    Parameters

    operationInfo

    An object containing information about the ongoing FIDO2 operation.

    Return Value

    The localized string to display in the Touch ID prompt. This string must not be empty.

  • Called just before the SDK attempts to initiate a system biometric authentication (Touch ID or Face ID). This method allows the application to give final confirmation before the system prompt is displayed.

    Declaration

    Objective-C

    - (void)biometricAuthenticatorShouldStartForOperationInfo:
                (nonnull TGFFido2OperationInfo *)operationInfo
                                                 biometryType:
                                                     (LABiometryType)biometryType
                                                 startHandler:
                                                     (void (^_Nonnull)(BOOL))
                                                         startHandler;

    Swift

    func biometricAuthenticatorShouldStart(_ operationInfo: TGFFido2OperationInfo, biometryType: LABiometryType, startHandler: @escaping (Bool) -> Void)

    Parameters

    operationInfo

    An object containing information about the ongoing FIDO2 operation.

    biometryType

    The type of biometry available on the device (e.g., LABiometryTypeFaceID, LABiometryTypeTouchID). See Apple’s LABiometryType documentation for details.

    startHandler

    A block that your application must call. Pass YES to allow the biometric prompt to be displayed, or NO to cancel the operation.

  • Called when the Apple biometric authentication process has finished, regardless of whether it succeeded or failed.

    Declaration

    Objective-C

    - (void)biometricAuthenticatorDidFinish;

    Swift

    optional func biometricAuthenticatorDidFinish()