UNPKG

1.54 kBTypeScriptView Raw
1export interface FingerprintOptions {
2 /**
3 * Key for platform keychain
4 */
5 clientId: string;
6 /**
7 * Secret password. Only for android
8 */
9 clientSecret?: string;
10 /**
11 * Disable 'use backup' option. Only for android (optional)
12 */
13 disableBackup?: boolean;
14}
15/**
16 * @beta
17 * @name FingerprintAIO
18 * @description
19 * Use simple fingerprint authentication on Android and iOS.
20 * Requires Cordova plugin: cordova-plugin-fingerprint-aio. For more info about plugin, vist: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio
21 *
22 * @usage
23 * ```typescript
24 * import { FingerprintAIO } from 'ionic-native';
25 *
26 * FingerprintAIO.show({
27 * clientId: "Fingerprint-Demo",
28 * clientSecret: "password", //Only necessary for Android
29 * disableBackup:true //Only for Android(optional)
30 * })
31 * .then((result: any) => console.log(any))
32 * .catch((error: any) => console.log(error));
33 *
34 * ```
35 * @interfaces
36 * FingerprintOptions
37 */
38export declare class FingerprintAIO {
39 /**
40 * Check if fingerprint authentication is available
41 * @return {Promise<any>} Returns a promise with result
42 */
43 static isAvailable(): Promise<any>;
44 /**
45 * Show authentication dialogue
46 * @param options {FingerprintOptions} options for platform specific fingerprint API
47 * @return {Promise<any>} Returns a promise that resolves when authentication was successfull
48 */
49 static show(options: FingerprintOptions): Promise<any>;
50}