PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()
.then((available) => {
if (available) {
// We can proceed with the creation of a PublicKeyCredential
// with this authenticator
} else {
// Use another kind of authenticator or a classical login/password
// workflow
}
})
.catch((err) => {
// Something went wrong
console.error(err);
});PublicKeyCredential: isUserVerifyingPlatformAuthenticatorAvailable() static method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.