diff --git a/handlers/authorizer/index.js b/handlers/authorizer/index.js index c208baa..79cb9b2 100644 --- a/handlers/authorizer/index.js +++ b/handlers/authorizer/index.js @@ -138,7 +138,7 @@ function validateToken(token) { console.log(decodedSignature); // verify the signature - const verify = crypto.createVerify('SHA256'); + const verify = crypto.createVerify(alg); verify.update(message); verify.end(); if (!verify.verify(publicKey, decodedSignature)) {