w3c / webauthn

Web Authentication: An API for accessing Public Key Credentials
https://w3c.github.io/webauthn/
Other
1.19k stars 172 forks source link

CR: Need a way to detect "cancel" #2211

Open hemanth opened 16 hours ago

hemanth commented 16 hours ago

Proposed Change

Need a way to programmatically detect when the user has cancelled the "Use passkey from another device" browser native prompt by clicking the "Cancel" button. This could be achieved by adding a new property or event to the prompt that indicates whether the user has cancelled the prompt.

image

^ the "cancel" button there.

timcappalli commented 15 hours ago

Use passkey from another device" browser native prompt by clicking the "Cancel" button.

This prompt is WebAuthn client-specific.

If the user cancels out of a WebAuthn ceremony, NotAllowedError is returned.

Also, take a look at #2095 which is planned for Level 4.

hemanth commented 15 hours ago

NotAllowedError can also be returned synchronously without user interaction?