changed token expiry to 300 seconds for test

master
varun 3 years ago
parent 5263286763
commit 204e3df465

@ -203,7 +203,7 @@ fastify.post("/api/login", {
//expiresIn: expressed in seconds or a string describing a time span zeit/ms. Eg: 60, "2 days", "10h", "7d". //expiresIn: expressed in seconds or a string describing a time span zeit/ms. Eg: 60, "2 days", "10h", "7d".
//A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), //A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc),
//otherwise milliseconds unit is used by default ("120" is equal to "120ms"). //otherwise milliseconds unit is used by default ("120" is equal to "120ms").
{ expiresIn: "300" } { expiresIn: "301" }
); );
var arr = loginObject.user.profile.role; var arr = loginObject.user.profile.role;
var arrayToString = JSON.stringify(Object.assign({}, arr)); // convert array to string var arrayToString = JSON.stringify(Object.assign({}, arr)); // convert array to string
@ -299,7 +299,7 @@ fastify.get("/api/reset_token/:customerId", {
userId: get_user._id, userId: get_user._id,
roles: get_user.profile.role, roles: get_user.profile.role,
}, },
{ expiresIn: "300" } { expiresIn: "301" }
); );
reply.send({ access_token: token, customerId: get_user.customerId }); reply.send({ access_token: token, customerId: get_user.customerId });
} catch (err) { } catch (err) {

Loading…
Cancel
Save