generated from lucien/api-template
fix: fixed jwt expiracy
This commit is contained in:
parent
eca9efc170
commit
ca9642ec27
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ router.post('/login', speedLimiter, limiter, async (req, res) => {
|
||||||
if (user[0]) {
|
if (user[0]) {
|
||||||
if (user[0].password === sha256(password)) {
|
if (user[0].password === sha256(password)) {
|
||||||
const token = jwt.sign({ id: user[0].id }, process.env.JWT_SECRET, {
|
const token = jwt.sign({ id: user[0].id }, process.env.JWT_SECRET, {
|
||||||
expiresIn: 1000 * 60 * 60 * 24 * 7,
|
expiresIn: 60 * 60 * 24 * 7,
|
||||||
});
|
});
|
||||||
return res.send({ token: token });
|
return res.send({ token: token });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue