summaryrefslogtreecommitdiffstats
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/User.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/User.js b/server/models/User.js
index e777878..8cc9c4c 100644
--- a/server/models/User.js
+++ b/server/models/User.js
@@ -42,8 +42,8 @@ userSchema.methods.generateJwtToken = async function (currentRef) {
return jwt.sign(
{ _id: this._id.toString(), ref },
- 'replaceThisWithSecretString',
- { expiresIn: 300 }
+ process.env.JWT_SECRET,
+ { expiresIn: parseInt(process.env.JWT_TOKEN_MAX_AGE) }
);
}