You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
737 B

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.platformAuthenticatorIsAvailable = platformAuthenticatorIsAvailable;
const browserSupportsWebAuthn_js_1 = require("./browserSupportsWebAuthn.js");
/**
* Determine whether the browser can communicate with a built-in authenticator, like
* Touch ID, Android fingerprint scanner, or Windows Hello.
*
* This method will _not_ be able to tell you the name of the platform authenticator.
*/
function platformAuthenticatorIsAvailable() {
if (!(0, browserSupportsWebAuthn_js_1.browserSupportsWebAuthn)()) {
return new Promise((resolve) => resolve(false));
}
return PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();
}