Fingerprint

This API provides a single and simple interface for accessing fingerprint.

Usage
Fingerprint.show({
    title: 'Authentication', 
    subtitle: 'Confirm you ID',
    description: 'Touch sensor' ,
    fallbackButtonTitle: 'Use Backup',                                   
    disableBackup:true,  
})
    .then((result) => console.log(result))
    .catch((error) => console.log(error));
window.Fingerprint.show({
    title: "Authentication",
    subtitle: "Confirm you ID",
    description: "Touch sensor",
    fallbackButtonTitle: "Use Backup",
    disableBackup: true,
})
    .then((result) => console.log(result))
    .catch((error) => console.log(error));
window.Fingerprint.show({
    title: "Authentication",
    subtitle: "Confirm you ID",
    description: "Touch sensor",
    fallbackButtonTitle: "Use Backup",
    disableBackup: true,
})
    .then((result) => console.log(result))
    .catch((error) => console.log(error));
(<any>window).Fingerprint.show({
    title: "Authentication",
    subtitle: "Confirm you ID",
    description: "Touch sensor",
    fallbackButtonTitle: "Use Backup",
    disableBackup: true,
})
    .then((result) => console.log(result))
    .catch((error) => console.log(error));
window.Fingerprint.show({
    title: "Authentication",
    subtitle: "Confirm you ID",
    description: "Touch sensor",
    fallbackButtonTitle: "Use Backup",
    disableBackup: true,
})
    .then((result) => console.log(result))
    .catch((error) => console.log(error));

Classes


Fingerprint

isAvailable
isAvailable(): Promise <any>

Check if the fingerprint functionality is available in the device.


RETURN
returns: Promise <any>
show
show(options: ShowOptions): Promise <any>
options: ShowOptions

RETURN
returns: Promise <any>
registerBiometricSecret
registerBiometricSecret(options: RegisterOptions): Promise <any>
options: RegisterOptions

RETURN
returns: Promise <any>
loadBiometricSecret
loadBiometricSecret(options: ShowOptions): Promise <any>
options: ShowOptions

RETURN
returns: Promise <any>

Interfaces

ShowOptions
interface ShowOptions {
    // Title in authentication dialogue. Default: "<APP_NAME> Biometric Sign On"
    title : string,
    // Subtitle in authentication dialogue. Default: null
    subtitle : string,
    // Description in authentication dialogue
    description : string,
    // Title of fallback button. Default:
    // When disableBackup is true: "Cancel"
    // When disableBackup is false: "Use Backup" (backup could be anything pin/pattern/password)
    fallbackButtonTitle : boolean,
    // Remove backup option on authentication. Default: false
    disableBackup : boolean,
    // Title of the cancel button
    cancelButtonTitle : string,
    // If false user confirmation is NOT required after a biometric has been authenticated . Default: true
    confirmationRequired : boolean
}
RegisterOptions
interface RegisterOptions {
    // Title in authentication dialogue. Default: "<APP_NAME> Biometric Sign On"
    title : string,
    // Subtitle in authentication dialogue. Default: null
    subtitle : string,
    // Description in authentication dialogue
    description : string,
    // Title of fallback button. Default:
    // When disableBackup is true: "Cancel"
    // When disableBackup is false: "Use Backup" (backup could be anything pin/pattern/password)
    fallbackButtonTitle : boolean,
    // Remove backup option on authentication. Default: false
    disableBackup : boolean,
    // Title of the cancel button
    cancelButtonTitle : string,
    // If false user confirmation is NOT required after a biometric has been authenticated. Default: true
    confirmationRequired : boolean,
    // String secret to encrypt and save, use simple strings matching the regex [a-zA-Z0-9-]+
    secret : string,
    // If true secret will be deleted when biometry items are deleted or enrolled
    invalidateOnEnrollment : boolean
}

Enumerations

ERRORS

enum ERRORS = {
    BIOMETRIC_UNKNOWN_ERROR : -100,
    BIOMETRIC_UNAVAILABLE : -101,
    BIOMETRIC_AUTHENTICATION_FAILED : -102,
    BIOMETRIC_SDK_NOT_SUPPORTED : -103,
    BIOMETRIC_HARDWARE_NOT_SUPPORTED : -104,
    BIOMETRIC_PERMISSION_NOT_GRANTED : -105,
    BIOMETRIC_NOT_ENROLLED : -106,
    BIOMETRIC_INTERNAL_PLUGIN_ERROR : -107,
    BIOMETRIC_DISMISSED : -108,
    BIOMETRIC_PIN_OR_PATTERN_DISMISSED : -109,
    BIOMETRIC_SCREEN_GUARD_UNSECURED : -110,
    BIOMETRIC_LOCKED_OUT : -111,
    BIOMETRIC_LOCKED_OUT_PERMANENT : -112
}