Replies: 4 comments 6 replies
-
See https://www.w3.org/TR/webauthn/#sign-counter. Counter is there to check for cloned or otherwise malfunctioning authenticators. |
Beta Was this translation helpful? Give feedback.
-
Okay thanks @aseigler for the link so the best practice is to update the db counter on each successful assertion to avoid clone ! May be it could be interesting to add a note on the docs to explain why it's important to save the counter after each operation to avoid cloned authenticators 👍 |
Beta Was this translation helpful? Give feedback.
-
I second adding to docs. I went to the discussions in hopes to find an answer to help me better understand what purpose the counter served. |
Beta Was this translation helpful? Give feedback.
-
I'm preparing to add the following to the docs:
And I'm currently intending to put this as a new Step 3 under "2. Verify registration response" here: https://simplewebauthn.dev/docs/packages/server#2-verify-registration-response How does this sound? |
Beta Was this translation helpful? Give feedback.
-
I see in the code.
What is the security purpose of this check ?
What are the risks if the counter is kept at 0 on the database side and is not updated after each assertion?
Beta Was this translation helpful? Give feedback.
All reactions