Skip to content

Commit

Permalink
Normalized verifyFingerprintWithCustomFallback on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Nov 28, 2016
1 parent 2e85c85 commit 9e2acb8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 1 addition & 8 deletions fingerprint-auth.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,7 @@ var verifyFingerprint = function (arg) {


var verifyFingerprintWithCustomFallback = function (arg) {
return new Promise(function (resolve, reject) {
try {
resolve('Not implemented');
} catch (ex) {
console.log("Error in verifyFingerprint: " + ex);
reject(ex);
}
});
return verifyFingerprint(arg);
};

/**
Expand Down
9 changes: 9 additions & 0 deletions fingerprint-auth.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ declare module "nativescript-fingerprint-auth" {

export function available(): Promise<boolean>;
export function didFingerprintDatabaseChange(): Promise<boolean>;

/**
* This (recommended) method uses keychain instead of localauth so the passcode fallback can be used.
*/
export function verifyFingerprint(options: VerifyFingerprintOptions): Promise<string>;

/**
* This implementation uses LocalAuthentication and has no built-in passcode fallback on iOS.
* On Android this is exactly the same as 'verifyFingerprint'
*/
export function verifyFingerprintWithCustomFallback(options: verifyFingerprintWithCustomFallbackOptions): Promise<string>;
}

0 comments on commit 9e2acb8

Please sign in to comment.