From 8de58048bc61a6c4e0084d40fbced16a3d02f89b Mon Sep 17 00:00:00 2001 From: Erdem Demir Date: Tue, 6 Feb 2024 17:31:31 +0300 Subject: [PATCH] Revert "Fix "Authentication token is not verified" problem (#116)" This reverts commit 5499fca2c5d702c1b6b2eef886b11348dad6bf1b. --- lib/utils.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index 8201220..7435410 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -22,13 +22,9 @@ var utils = module.exports = { return shaSum.digest('base64'); }, generateHashV2: function (apiKey, separator, uri, randomString, secretKey, body) { - var payload = randomString + uri; - if (Object.keys(body).length > 0) { - payload += JSON.stringify(body) - } var signature = crypto .createHmac('sha256', secretKey) - .update(payload) + .update(randomString + uri + JSON.stringify(body)) .digest('hex'); var authorizationParams = [