admin管理员组

文章数量:1421557

How can you know if a system has a registered passkey without entering an email, and if no passkey , do not set up autoComplete with WebAuthn.like the blower image enter image description hereenter image description here enter image description here I know how to autofill the UI for passkeys, but my issue is that in scenarios without a passkey, the dropdown list still displays "use a different passkey," which can confuse users. Especially when the user has not registered a passkey, the drop-down panel displays "use a passkey", which is a bad experience,Therefore, what I want to achieve is to set authcomplete="username webauthn" only when the user has a passkey, and if the device does not have a passkey, set authcomplete="off." My question is how can I determine passkey existence without triggering the passkey interaction panel so that I can set authcomplete accordingly. I want to know if there is any way to determine whether the system has a corresponding passkey. If so, set webauthn. If not, do not set it (only display the account and password),just like picture show ,github implement this feature

How can you know if a system has a registered passkey without entering an email, and if no passkey , do not set up autoComplete with WebAuthn.like the blower image enter image description hereenter image description here enter image description here I know how to autofill the UI for passkeys, but my issue is that in scenarios without a passkey, the dropdown list still displays "use a different passkey," which can confuse users. Especially when the user has not registered a passkey, the drop-down panel displays "use a passkey", which is a bad experience,Therefore, what I want to achieve is to set authcomplete="username webauthn" only when the user has a passkey, and if the device does not have a passkey, set authcomplete="off." My question is how can I determine passkey existence without triggering the passkey interaction panel so that I can set authcomplete accordingly. I want to know if there is any way to determine whether the system has a corresponding passkey. If so, set webauthn. If not, do not set it (only display the account and password),just like picture show ,github implement this feature

Share Improve this question edited Jan 17 at 18:38 daifang deng asked Jan 17 at 17:45 daifang dengdaifang deng 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

The autofill UI is designed to be used for exactly this use case. You call WebAuthn in a conditionally mediated mode on page load, which will offer the autofill UI experience to the user.

https://passkeys.dev/docs/use-cases/bootstrapping/#authenticating-the-user

This is the recommended experience if your login screen has a username / identifier field.

本文标签: autocompletewebauthn passkeyformautofill condition uiStack Overflow