diff --git a/routes/user.js b/routes/user.js index 91c7e68..5bf0cfc 100644 --- a/routes/user.js +++ b/routes/user.js @@ -13,7 +13,7 @@ router.post('/signup', async (req, res) => { if(users.length == 0) { let user = new User(email, password); await collection.insertOne(user.toDB()); - user.token = jwt.sign({ email }, '#IWantToBelieve', { expiresIn: '365d' }); + user.token = jwt.sign({ email }, process.env.JWT_SECRET_AUTH, { expiresIn: process.env.JWT_EXPIRATION_TIME }); res.send({ success: true, data: user }); } else { res.send(makeError('User already exists'));