From b5f8a6cc1ceb7a3e7d1a9658d82f3c90ee32da32 Mon Sep 17 00:00:00 2001 From: Birm Date: Mon, 15 Jan 2024 20:17:29 -0500 Subject: [PATCH] no alg --- handlers/customLogin.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/handlers/customLogin.js b/handlers/customLogin.js index c0f7d6d..a8647cc 100644 --- a/handlers/customLogin.js +++ b/handlers/customLogin.js @@ -8,15 +8,14 @@ function customLogin(usernameField, usertypeField) { let token = {}; // get user id from env username = process.env[usernameField] || "unknown user"; - token.sub = username; - token.email = username; - token.name = username; + token['sub'] = username; + token['email'] = username; + token['name ']= username; usertype = process.env[usertypeField]; - token.userType = usertype || "Participant"; + token['userType'] = usertype || "Participant"; // generate token with this info // return the token signedToken = jwt.sign(token, "precision-fda-not-secure-token", { - algorithm: 'RS256', expiresIn: EXPIRY, }); res.json({"token": signedToken});