From e335d0f6016c76575ed768d6c33130f8ff847b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 8 Feb 2023 13:22:16 -0500 Subject: [PATCH] fix: email expiry timestamps emailConfirmExpiry is hours and default is 24 --- src/user/email.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/user/email.js b/src/user/email.js index c6fc3274d4..9b51b43ddd 100644 --- a/src/user/email.js +++ b/src/user/email.js @@ -134,13 +134,13 @@ UserEmail.sendValidationEmail = async function (uid, options) { await UserEmail.expireValidation(uid); await db.set(`confirm:byUid:${uid}`, confirm_code); - await db.pexpire(`confirm:byUid:${uid}`, emailConfirmExpiry * 24 * 60 * 60 * 1000); + await db.pexpire(`confirm:byUid:${uid}`, emailConfirmExpiry * 60 * 60 * 1000); await db.setObject(`confirm:${confirm_code}`, { email: options.email.toLowerCase(), uid: uid, }); - await db.pexpire(`confirm:${confirm_code}`, emailConfirmExpiry * 24 * 60 * 60 * 1000); + await db.pexpire(`confirm:${confirm_code}`, emailConfirmExpiry * 60 * 60 * 1000); winston.verbose(`[user/email] Validation email for uid ${uid} sent to ${options.email}`); events.log({