diff options
-rw-r--r-- | packages/browser/src/methods/startAuthentication.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/browser/src/methods/startAuthentication.ts b/packages/browser/src/methods/startAuthentication.ts index 6e3940d..2c95a34 100644 --- a/packages/browser/src/methods/startAuthentication.ts +++ b/packages/browser/src/methods/startAuthentication.ts @@ -59,13 +59,13 @@ export async function startAuthentication( // Check for an <input> with "webauthn" in its `autocomplete` attribute const eligibleInputs = document.querySelectorAll( - 'input[autocomplete*=\'webauthn\']', + 'input[autocomplete$=\'webauthn\']', ); // WebAuthn autofill requires at least one valid input if (eligibleInputs.length < 1) { throw Error( - 'No <input> with `"webauthn"` in its `autocomplete` attribute was detected', + 'No <input> with `"webauthn"` as the only or last value in its `autocomplete` attribute was detected', ); } |