[英]Determining the biometric capability of a device using JS
我正在尝试使用 Javascript 检测运行我的应用程序的设备上的浏览器是否支持生物识别功能。具体来说,我想检测设备是否支持 FaceId 或 TouchId。 我知道虽然 WebAuthn 你可以这样做:
if (window.PublicKeyCredential) {
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()
.then((available) => {
if (available) {
console.log("Supported.");
} else {
console.log(
"WebAuthn supported, Platform Authenticator *not* supported."
);
}
})
.catch((err) => console.log("Something went wrong."));
} else {
console.log("Not supported.");
}
但是,这只会让我知道该设备是否具有生物识别功能。 它不会区分 FaceId 或 TouchId。 我如何通过 Javascript 获得该级别的详细信息?
isUserVerifyingPlatformAuthenticatorAvailable
并不意味着生物识别。 是指具有用户验证能力的平台认证器。 用户验证可以是 PIN、本地密码或生物识别。
平台身份验证器的生物识别功能目前未通过 WebAuthn 公开。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.