Fix isSupported method of biometric keystore on cordova
This commit is contained in:
parent
39f388bc54
commit
c92bb61bba
|
@ -70,7 +70,13 @@ export class CordovaPlatform extends WebPlatform implements Platform {
|
|||
|
||||
biometricKeyStore = {
|
||||
async isSupported() {
|
||||
return Fingerprint.isAvailable();
|
||||
await cordovaReady;
|
||||
return new Promise<boolean>((resolve) =>
|
||||
Fingerprint.isAvailable(
|
||||
(res: string) => resolve(!!res),
|
||||
() => resolve(false)
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
async storeKey(_id: string, key: Uint8Array) {
|
||||
|
@ -126,7 +132,7 @@ export class CordovaPlatform extends WebPlatform implements Platform {
|
|||
|
||||
readonly platformMFAType = MFAType.PublicKey;
|
||||
|
||||
async supportsPlatformAuthenticator() {
|
||||
return await this.biometricKeyStore.isSupported();
|
||||
supportsPlatformAuthenticator() {
|
||||
return this.biometricKeyStore.isSupported();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue