passport-fido2
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -25,2 +25,5 @@ 'use strict'; | ||
} | ||
const css = crypto.createHmac('sha256', this.hmacSecret) | ||
.update(req.query.c) | ||
.digest('hex'); | ||
const digest = crypto.createHash('sha256') | ||
@@ -32,2 +35,5 @@ .update(new Buffer(req.query.clientData, 'base64')) | ||
.update(digest); | ||
if(css != req.query.cs){ | ||
return this.fail({message: 'Failed verification challenge'}, 400); | ||
} | ||
if(!verify.verify(jwkToPem(key), req.query.signature, 'base64')){ | ||
@@ -34,0 +40,0 @@ return this.fail({message: 'Failed verification signature'}, 400); |
{ | ||
"name": "passport-fido2", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib", |
# Passport-FIDO2 | ||
** THIS IS BETA ** | ||
**THIS IS BETA** | ||
Passport strategy for authenticating with FIDO 2.0. | ||
[Passport](http://passportjs.org/) strategy for authenticating with FIDO 2.0. | ||
@@ -7,0 +7,0 @@ ## Install |
5063
68
6