From db8b059fd0cbf190eda8ff910961867938124088 Mon Sep 17 00:00:00 2001 From: varun Date: Fri, 24 Feb 2023 01:07:07 -0500 Subject: [PATCH] changed token expiry to 60 seconds for test --- src/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 36d31418..4f957c84 100644 --- a/src/index.js +++ b/src/index.js @@ -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". //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"). - { expiresIn: "15d" } + { expiresIn: "60" } ); var arr = loginObject.user.profile.role; 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, roles: get_user.profile.role, }, - { expiresIn: "15d" } + { expiresIn: "60" } ); reply.send({ access_token: token, customerId: get_user.customerId }); } catch (err) { @@ -352,9 +352,6 @@ fastify.register(require("./routes/forTestingRoute")); // Run the server! const start = async () => { - - - try {