mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-01 20:32:55 +08:00
fix(fingerprint-aio) : Added optional parameters to isAvailable() (#4912)
* Update fingerprint-aio/index.ts Added two optional parameters to FingerprintAIO.isAvailable to reflect the optional parameters of isAvailable in cordova-plugin-fingerprint-aio * Update index.ts Added documentation to isAvailable() * Update index.ts Added documentation to plugin * Added "callbackOrder : 'reverse'" to isAvailable()
This commit is contained in:
parent
562489a97e
commit
4411b182b0
@ -157,6 +157,22 @@ export interface FingerprintSecretOptions extends FingerprintOptions {
|
||||
invalidateOnEnrollment?: boolean;
|
||||
}
|
||||
|
||||
export interface FingerprintAvailableOptions {
|
||||
/**
|
||||
* (Android): If true will only return success if Class 3 (BIOMETRIC_STRONG) Biometrics are enrolled on the device.
|
||||
* It is reccomended you use this if planning on using the registerBiometricSecret and loadBiometricSecret methods.
|
||||
*/
|
||||
requireStrongBiometrics: boolean;
|
||||
|
||||
/**
|
||||
* (iOS): If true checks if backup authentication option is available, e.g. passcode.
|
||||
* Default: false, which means check for biometrics only.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allowBackup?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Fingerprint AIO
|
||||
* @description
|
||||
@ -209,6 +225,7 @@ export interface FingerprintSecretOptions extends FingerprintOptions {
|
||||
* @interfaces
|
||||
* FingerprintOptions
|
||||
* FingerprintSecretOptions
|
||||
* FingerprintAvailableOptions
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'FingerprintAIO',
|
||||
@ -223,11 +240,14 @@ export class FingerprintAIO extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
* Check if fingerprint authentication is available
|
||||
*
|
||||
* @param {FingerprintAvailableOptions} options Options for platform specific fingerprint API
|
||||
* @returns {Promise<BIOMETRIC_TYPE>} Returns a promise with result which depends on device and os.
|
||||
* iPhone X will return 'face' other Android or iOS devices will return 'finger' Android P+ will return 'biometric'
|
||||
*/
|
||||
@Cordova()
|
||||
isAvailable(): Promise<BIOMETRIC_TYPE> {
|
||||
@Cordova({
|
||||
callbackOrder: 'reverse'
|
||||
})
|
||||
isAvailable(options: FingerprintAvailableOptions): Promise<BIOMETRIC_TYPE> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user