我只是在开发一个示例节点js应用程序,以便在Windows 10上运行webauthn。
challenge: challenge,
rp: {
name: "Example CORP",
id : "localhost"
},
user: {
id: new Uint8Array(16),
name: "jdoe@example.com",
displayName: "John Doe"
},
pubKeyCredParams: [
{
type: "public-key",
alg: -7
}
],authenticatorSelection: {
authenticatorAttachment: "platform" //cross-platform is working fine
},
timeout: 60000
};
const credential = navigator.credentials.create({
publicKey: publicKey
});我确实得到了以下错误,我没有看到任何模式窗口的Windows Hello。
login:32 publicKey.authenticatorSelection.userVerification was not set to any value in Web Authentication navigator.credentials.create() call. This defaults to 'preferred', which is probably not what you want. If in doubt, set to 'discouraged'. See https://chromium.googlesource.com/chromium/src/+/master/content/browser/webauth/uv_preferred.md for details还有我错过的其他对角线吗?
-锡瓦
发布于 2021-10-18 08:00:37
您没有在userVerification对象中定义authenticatorSelection属性。
来自W3.org
让
userVerification成为断言的有效用户验证需求:是设置为必需的让userVerification为true。设置为劝阻的,让userVerification为false。如果身份验证器能够进行用户验证,则将首选设置为userVerification为true。如果身份验证器无法进行用户验证,请让userVerification为false。
authenticatorSelection: {
authenticatorAttachment: "platform",
userVerification: "required"
},https://stackoverflow.com/questions/69611717
复制相似问题