MasterKale / SimpleWebAuthn

WebAuthn, Simplified. A collection of TypeScript-first libraries for simpler WebAuthn integration. Supports modern browsers, Node, Deno, and more.
https://simplewebauthn.dev
MIT License
1.62k stars 137 forks source link

fix/446-enforce-conditional-ui-autocomplete-token-order #451

Closed MasterKale closed 1 year ago

MasterKale commented 1 year ago

This PR tweaks startAuthentication() in browser to check that the "webauthn" value in an <input>'s autocomplete attribute is either the sole value or the last value. This aligns things with the WHATWG, which helps conditional UI appear more reliably in browsers that enforce autocomplete token order (i.e. Chrome.)

Screenshot 2023-10-02 at 11 10 04 PM

Fixes #446.

zhangbobell commented 1 year ago

Thank you for providing such a simple library for Webauthn, I encounter a problem when using Web Components, since it using a shadow DOM, so the detection method querySelectorAll could not visited the input inside the Shadow DOM, so could you help me to figure out how to solve the problem?

MasterKale commented 1 year ago

@zhangbobell Please start a new Discussion about this, PR's are awful places for questions like yours to get a response.

https://github.com/MasterKale/SimpleWebAuthn/discussions/new/choose

zhangbobell commented 1 year ago

@MasterKale OK, Thanks!