Skip to content

Commit

Permalink
chore: increase expiresIn jwt token
Browse files Browse the repository at this point in the history
  • Loading branch information
Myphz committed Apr 5, 2023
1 parent b019a9e commit 1809bb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/helpers/jwt.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { JWT_KEY } from "../config/config.js";
export function issueJWT(user, fields, opts) {
const payload = {
sub: user._id,
...(fields || {})
...(fields || {}),
};

return jwt.sign(payload, JWT_KEY, {
expiresIn: "14d",
...(opts || {})
expiresIn: "100d",
...(opts || {}),
});
}

Expand All @@ -20,4 +20,4 @@ export function decodeJWT(jwtToken) {
if (err) return;
return decoded;
});
}
}

0 comments on commit 1809bb0

Please sign in to comment.