Skip to content

Commit

Permalink
Fix expiresIn value
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Mar 17, 2024
1 parent a85cdc3 commit 31f9049
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/api/routes/auth/forgot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const parseForm = bodyParser.json();

const generateToken = (payload: string) =>
jwt.sign(payload, process.env.TOKEN_SECRET!, {
expiresIn: "60m",
expiresIn: 3600,
});

export const get = async (
Expand Down
2 changes: 1 addition & 1 deletion packages/api/routes/auth/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const isValidEmail = (email: string) => EMAIL_REGEX.test(email);

export const generateAccessToken = (payload: User) =>
jwt.sign(payload, process.env.TOKEN_SECRET!, {
expiresIn: `${60 * 24 * 14}m`,
expiresIn: 60 * 24 * 14,
});
export const loginAs = async (user: user, hashedPassword: string) =>
generateAccessToken({
Expand Down

0 comments on commit 31f9049

Please sign in to comment.