fix(webauthn): fix webauthn key option during registration to impl discoverable key#2451
Open
EzraRT wants to merge 1 commit intoOpenListTeam:mainfrom
Open
fix(webauthn): fix webauthn key option during registration to impl discoverable key#2451EzraRT wants to merge 1 commit intoOpenListTeam:mainfrom
EzraRT wants to merge 1 commit intoOpenListTeam:mainfrom
Conversation
Contributor
Author
|
@jyxjjj Hi,可以帮我指定一位 Reviewer 吗 |
Member
|
用户已经创建过密钥的,是否需要迁移流程呢? |
Contributor
Author
之前创建的,不输入用户名无法显示,输入用户名后仍可显示,不影响旧流程。 |
Member
jyxjjj
approved these changes
May 7, 2026
Contributor
Author
|
看起来 #2161 也修改了这一行,先合入这个应该不会导致冲突。其余部分待其他人有空审查再合入吧。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description / 描述
一句话:现在使用通行密钥登录时,不用提前输入用户名了。
修复 WebAuthn 注册流程中的 key option 配置,注册时显式要求使用 discoverable key(resident key)。
Motivation and Context / 背景
当前注册流程中未明确要求 discoverable key,可能导致部分依赖该能力的 WebAuthn 注册/认证场景行为不符合预期。
这次修改通过在注册阶段增加
ResidentKeyRequirementRequired配置,使注册结果更符合 discoverable key 的预期使用方式修改前:不提前输入用户名,密码管理器不会罗列该站点的通行密钥

修改后:不提前输入用户名,密码管理器可以正常罗列该站点的所有通行密钥

How Has This Been Tested? / 测试
基于本次提交内容进行了代码层面的检查,确认:
server/handles/webauthn.go,未引入额外接口变更。{ "authenticatorSelection": { "requireResidentKey": true, "residentKey": "required" } }username参数时,客户端可发现该站点所有通行密钥,服务端接收请求时可正常从通行密钥中解析出用户并完成登录流程;Checklist / 检查清单
我已阅读 CONTRIBUTING 文档。
go fmtor prettier.我已使用
go fmt或 prettier 格式化提交的代码。我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。