From de8d49aea3975471f2d26778dae7eeb860c91a8f Mon Sep 17 00:00:00 2001 From: wancat Date: Fri, 1 Sep 2023 13:54:51 +0800 Subject: [PATCH] fix: change jwt expiry time to config * rename dockerfile env --- quests/helloworld/Dockerfile | 2 +- server/src/utils/auth.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quests/helloworld/Dockerfile b/quests/helloworld/Dockerfile index bd9c4bb..e845379 100644 --- a/quests/helloworld/Dockerfile +++ b/quests/helloworld/Dockerfile @@ -1,5 +1,5 @@ FROM lancatlin/linux-odyssey:base -COPY ./quests/helloworld/home /home/${USERNAME}/ +COPY ./quests/helloworld/home ${HOME} CMD [ "/bin/zsh" ] diff --git a/server/src/utils/auth.js b/server/src/utils/auth.js index d97de3a..49d3ac6 100644 --- a/server/src/utils/auth.js +++ b/server/src/utils/auth.js @@ -19,7 +19,7 @@ export function genSessionJWT(session) { jwt.sign( { session_id: session.id }, config.jwtSecret, - { expiresIn: '1h' }, + { expiresIn: config.expiry }, (err, token) => { if (err) { reject(err)