diff --git a/apps/server/dist/routes/auth.js b/apps/server/dist/routes/auth.js index 4306ca8..b84ecf3 100644 --- a/apps/server/dist/routes/auth.js +++ b/apps/server/dist/routes/auth.js @@ -48,7 +48,7 @@ router.post('/login', (req, res) => __awaiter(void 0, void 0, void 0, function* const { username, password } = req.body; const user = yield db_1.User.findOne({ username, password }); if (user) { - const token = jsonwebtoken_1.default.sign({ id: user._id }, index_1.SECRET, { expiresIn: '9h' }); + const token = jsonwebtoken_1.default.sign({ id: user._id }, index_1.SECRET, {}); res.json({ message: 'Logged in successfully', token }); } else { diff --git a/apps/server/routes/auth.ts b/apps/server/routes/auth.ts index 7f55a89..4186f5d 100644 --- a/apps/server/routes/auth.ts +++ b/apps/server/routes/auth.ts @@ -39,7 +39,7 @@ router.post('/signup', async (req, res) => { const { username, password } = req.body; const user = await User.findOne({ username, password }); if (user) { - const token = jwt.sign({ id: user._id }, SECRET, { expiresIn: '9h' }); + const token = jwt.sign({ id: user._id }, SECRET, {}); res.json({ message: 'Logged in successfully', token }); } else { res.status(403).json({ message: 'Invalid username or password' });