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
neither the affiliated https://webauthn.guide/, the readme, nor the examples talk about how to handle the challenge
my read is that the server is intended to store the challenge in a way that associates it with each registration/login attempt because the verify functions all take expected_challenge
I found this cumbersome (I didn't have a redis or similar and didn't want to store them in my DB), so I instead came up with a signing mechanism for my challenges where I HMAC a secret with the time and the user's username (and check that the signature happened in the last 300 seconds)
as you can see, I had to pull apart the clientDataJSON to get at the challenge to verify the signature
then, I fed the "expected" challenge to webauthn for no reason
it'd be great if webauthn both provided some guidance on how to handle challenges and to support this sort of signed challenge
also credential_current_sign_count just seems pretty pointless and I'd really like to not pass it in. if I really wanted to track this, I can write my own incrementor. it's not helping
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
neither the affiliated https://webauthn.guide/, the readme, nor the examples talk about how to handle the challenge
my read is that the server is intended to store the challenge in a way that associates it with each registration/login attempt because the verify functions all take
expected_challenge
I found this cumbersome (I didn't have a redis or similar and didn't want to store them in my DB), so I instead came up with a signing mechanism for my challenges where I HMAC a secret with the time and the user's username (and check that the signature happened in the last 300 seconds)
as you can see, I had to pull apart the
clientDataJSON
to get at the challenge to verify the signaturethen, I fed the "expected" challenge to webauthn for no reason
it'd be great if webauthn both provided some guidance on how to handle challenges and to support this sort of signed challenge
also
credential_current_sign_count
just seems pretty pointless and I'd really like to not pass it in. if I really wanted to track this, I can write my own incrementor. it's not helpingBeta Was this translation helpful? Give feedback.
All reactions