Authenticating from multiple devices
See original GitHub issueI am having trouble in understanding how exactly one would authenticate a user that wants to use multiple devices to log in… Lets say a user has a mac laptop with touchId and a windows pc with a security key. I register on my laptop using my touch id. That generates a public key which is then saved, and I can log in just fine on my laptop. Now I switch to my PC and want to register. I understand that there is a allowCredentials
field, but I am not sure what is its use exactly. If I try to register on my PC, and save just the credential ID of that pc, but I try to log in using the public key generated from the laptop, I am guessing that will just fail, right? Would I need to also save an array of public keys, and try to authenticate with each one of them? Or maybe save which credential ID matches to which public key? This is just theory crafting as I unfortunately don’t have multiple webauth capable devices around me to test right now, so sorry if this may be a dumb question
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
And yes, https://github.com/Hexagon/webauthn-skeleton/blob/1589d51af93d3befa6d9a029ae7172e0993b4e61/routes/webauthn.js#L215 does exactly what you desribed above, looping through each public key 😃
Yep, that’s what I thought I need to do, although I didn’t know that the cred Id would also need to be saved in the DB. Thank you for the demo, helped a lot