Skip to content

Commit

Permalink
expire token in one week
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeshkhadka committed Jan 31, 2024
1 parent 82c0817 commit 7a6d220
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type TempTokenInfo = {
export function createJwt(user: User) {
const jwtSecret = process.env.JWT_SECRET;
if (jwtSecret) {
const token = jwt.sign(user, jwtSecret, {expiresIn: "7d"});
const token = jwt.sign(user, jwtSecret, { expiresIn: "7d" });
return token;
} else {
console.log("JWT secret not found");
Expand Down

0 comments on commit 7a6d220

Please sign in to comment.