Skip to content

Commit

Permalink
Set timeout on JWT in confirmation emails
Browse files Browse the repository at this point in the history
  • Loading branch information
yijen-sun committed Oct 20, 2023
1 parent 0c5ee39 commit 1bd2960
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/api-v2/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ JWT_SECRET_KEY=chungusdevs
JWT_EXPIRE_TIME=86400000
PORT=3001
NODE_ENV=development
JWT_EXPIRE_TIME_EMAIL=21600
# 15 minutes in milliseconds
JWT_EXPIRE_TIME_EMAIL=6000000
EMAIL_CONFIRMATION_URL=http://localhost:3002/confirmEmail
EMAIL_SERVICE=gmail
EMAIL_USER=[insert email from notion]
Expand Down
2 changes: 1 addition & 1 deletion packages/api-v2/src/email/email.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { EmailConfirmationController } from "src/emailConfirmation/emailConfirma
JwtModule.register({
secret: process.env.JWT_SECRET_KEY,
signOptions: {
expiresIn: process.env.JWT_EXPIRE_TIME,
expiresIn: process.env.JWT_EXPIRE_TIME_EMAIL,
},
}),
],
Expand Down

0 comments on commit 1bd2960

Please sign in to comment.