From 10bf42b0957cf803697480d53cfaebb1ff2017b0 Mon Sep 17 00:00:00 2001 From: kg0r0 Date: Thu, 21 Mar 2019 01:30:15 +0900 Subject: [PATCH] Fix counter --- utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.js b/utils.js index 9d0f161..00567a8 100644 --- a/utils.js +++ b/utils.js @@ -331,7 +331,7 @@ let verifyAuthenticatorAssertionResponse = (webAuthnResponse, authenticators) => response.verified = verifySignature(signature, signatureBase, publicKey) if(response.verified) { - if(response.counter <= authr.counter) + if(authrDataStruct.counter <= authr.counter) throw new Error('Authr counter did not increase!'); authr.counter = authrDataStruct.counter