首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Webauthn - Windows不工作

Webauthn - Windows不工作
EN

Stack Overflow用户
提问于 2021-10-18 06:39:06
回答 1查看 731关注 0票数 1

我只是在开发一个示例节点js应用程序,以便在Windows 10上运行webauthn。

代码语言:javascript
复制
        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。

代码语言:javascript
复制
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

还有我错过的其他对角线吗?

-锡瓦

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-10-18 08:00:37

您没有在userVerification对象中定义authenticatorSelection属性。

来自W3.org

userVerification成为断言的有效用户验证需求:是设置为必需的userVerification为true。设置为劝阻的,让userVerification为false。如果身份验证器能够进行用户验证,则将首选设置为userVerification为true。如果身份验证器无法进行用户验证,请让userVerification为false。

代码语言:javascript
复制
authenticatorSelection: {
  authenticatorAttachment: "platform",
  userVerification: "required" 
},
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69611717

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档