Skip to content

Commit

Permalink
chore(jwt): expire JWT in 6 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
ful1e5 committed Nov 21, 2023
1 parent b2077cc commit b90ddf7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/auth/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export const genAccessToken = (user?: User) => {
if (user) payload = { ...user, token_id };

const token = jwt.sign(payload, process.env.NEXT_PUBLIC_JWT_SECRET, {
algorithm: 'HS256'
algorithm: 'HS256',
expiresIn: 360
});

return {
Expand Down

0 comments on commit b90ddf7

Please sign in to comment.