You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -237,7 +237,8 @@ begin
237
237
webauthn_credential.verify(
238
238
session[:authentication_challenge],
239
239
public_key: stored_credential.public_key,
240
-
sign_count: stored_credential.sign_count
240
+
sign_count: stored_credential.sign_count,
241
+
user_verification:true, # needed for passwordless verification
241
242
)
242
243
243
244
# Update the stored credential sign count with the value from `webauthn_credential.sign_count`
@@ -384,11 +385,14 @@ Verifies the asserted WebAuthn credential is [valid](https://www.w3.org/TR/webau
384
385
Mainly, that the client provided a valid cryptographic signature for the corresponding stored credential public
385
386
key, among other extra validations.
386
387
388
+
Note that the `user_verification: true` flag is required to ensure that the the authenticator has verified the user's identity before sending the credentials. See the following [CVE-2020-8236 writeup](https://hwsecurity.dev/2020/08/webauthn-pin-bypass/)
389
+
387
390
```ruby
388
391
credential_with_assertion.verify(
389
392
session[:authentication_challenge],
390
393
public_key: stored_credential.public_key,
391
-
sign_count: stored_credential.sign_count
394
+
sign_count: stored_credential.sign_count,
395
+
user_verification:true# needed for passwordless verification
0 commit comments