diff --git a/apps/server/dist/routes/auth.js b/apps/server/dist/routes/auth.js index b1b81ce..4306ca8 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: '1h' }); + const token = jsonwebtoken_1.default.sign({ id: user._id }, index_1.SECRET, { expiresIn: '9h' }); res.json({ message: 'Logged in successfully', token }); } else { diff --git a/apps/server/routes/auth.ts b/apps/server/routes/auth.ts index 7aa9de1..7f55a89 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: '1h' }); + const token = jwt.sign({ id: user._id }, SECRET, { expiresIn: '9h' }); res.json({ message: 'Logged in successfully', token }); } else { res.status(403).json({ message: 'Invalid username or password' });