From 1f2ceb3f8a4691e72c9df44fd3796a042758c575 Mon Sep 17 00:00:00 2001 From: Davin Wu <57989149+a180024@users.noreply.github.com> Date: Mon, 19 Oct 2020 01:56:51 +0800 Subject: [PATCH] Update auth.js --- routes/auth.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes/auth.js b/routes/auth.js index e44a21508..1d5147042 100644 --- a/routes/auth.js +++ b/routes/auth.js @@ -13,12 +13,14 @@ function getTokenFromHeader(req){ var auth = { required: jwt({ secret: secret, + algorithms: ['HS256'], userProperty: 'payload', getToken: getTokenFromHeader }), optional: jwt({ secret: secret, userProperty: 'payload', + algorithms: ['HS256'], credentialsRequired: false, getToken: getTokenFromHeader })