Windows Hello?
MojoJojo opened this issue · comments
Hi,
I was trying to modify the example for to work with Windows Hello but not sure how to go about it. I modified utils.js
to allow for Windows Hello public keys:
pubKeyCredParams: [
{
type: "public-key", alg: -7 // "ES256" IANA COSE Algorithms registry
},
{
//Windows Hello supports the RS256 algorithm
type: "public-key",
alg: -257
},
],
However, when I run the demo, it fails with the following error on the server:
Error: Authenticator Data could not be parsed
at parseAuthenticatorData (C:\xxxxx\webauthn-demo\utils.js:417:15)
at Object.verifyAuthenticatorAttestationResponse (C:\xxxxx\webauthn-demo\utils.js:224:33)
at C:\xxxxx\webauthn-demo\routes\webauthn.js:112:24
at Layer.handle [as handle_request] (C:\xxxxx\webauthn-demo\node_modules\express\lib\router\layer.js:95:5)
at next (C:\xxxxx\webauthn-demo\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\xxxxx\webauthn-demo\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (C:\xxxxx\webauthn-demo\node_modules\express\lib\router\layer.js:95:5)
at C:\xxxxx\webauthn-demo\node_modules\express\lib\router\index.js:281:22
at Function.process_params (C:\xxxxx\webauthn-demo\node_modules\express\lib\router\index.js:335:12)
at next (C:\xxxxx\webauthn-demo\node_modules\express\lib\router\index.js:275:10)
Seems like the parsing needs to be changed for Windows Hello format (or any other format for that matter)?
Try this:
pubKeyCredParams: [ { type: "public-key", alg: -7 // "ES256" IANA COSE Algorithms registry }, { type: "public-key", alg: -257//Windows Hello supports the RS256 algorithm } ]
Current demo don't support another, only fmt: fido-u2f
, my windows hello use fmt: tpm
Line 266 in ccea83d
A working and improved version (with Windows hello and android support) available at http://github.com/hexagon/webauthn-skeleton