Modules.Identity.IdentityAuthenticationType
Dictionary passed to Modules.Identity.authenticate.
Platforms: android, iphone, ipad
Properties #
allowableReuseDuration#
Type: Number
Note: This property is iOS only!
The time interval (in seconds) for accepting a successful Touch ID / Face ID device
unlock (on the lock screen) from the past. If the device was successfully
unlocked by Touch ID / Face ID within this time interval, then the biometric authentication
on this context will succeed automatically and the reply block will be
called without prompting user for authentication.
The default value is 0, meaning that no previous TouchID unlock can be reused.
This property is meant only for reusing biometric matches from the device
lock screen. It does not allow reusing previous biometric matches in
application or between applications.
The maximum supported interval is 5 minutes and setting the value beyond
5 minutes does not increase the accepted interval.
callback#
Type: Callback
Callback function executed after the authentication completes.
The callback function is passed a dictionary with three properties:
* success (Boolean): Set to true if authentication succeeded.
* error (String): System error message.
* code (Number): Module ERROR_* constant indicating the reason for the failure.
cancelTitle#
Type: String
Allows cancel button title customization. A default localized title "Cancel"
is used when this property is not defined or is set to empty string.
Android: The default value will be "Cancel".
confirmationRequired#
Type: String
Sets a hint to the system for whether to require user confirmation after
authentication. For example, implicit modalities like face and iris are passive,
meaning they don't require an explicit user action to complete authentication.
See https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setConfirmationRequired(boolean)
fallbackTitle#
Type: String
Note: This property is iOS only!
Allows fallback button title customization. A default localized title
"Enter Password" is used when this property is left nil. If set to empty
string, the button will be hidden.
keepAlive#
Type: Boolean
Note: This property is iOS only!
Determines whether the auth-context should be kept alive after authorizing
with the TouchID-API and can be used to automatically terminate an auth-context
after authorizing.
Please note that calling invalidate will not be possible unless you
have a valid auth-context, so you would decide whether to use invalidate
to invalidate the context and release the auth-instance or use the keepAlive
property inside authenticate to only terminate the context.
Terminated contexts cannot be recovered and will be recreated with a new auth-context
once authenticate is called again.
reason#
Type: String
Message displayed in the authentication dialog describing why the
application is requesting authentication. Android: The title of the dialog.