The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
fix: update reset token query
Mythie0ec59763977f
diff --git a/packages/lib/server-only/user/forgot-password.ts b/packages/lib/server-only/user/forgot-password.tsindex da194f0f7..14ae48453 100644--- a/packages/lib/server-only/user/forgot-password.ts+++ b/packages/lib/server-only/user/forgot-password.ts@@ -20,12 +20,12 @@ export const forgotPassword = async ({ email }: TForgotPasswordFormSchema) => {return;}- // Find a token that was created in the last day and hasn't expired+ // Find a token that was created in the last hour and hasn't expiredconst existingToken = await prisma.passwordResetToken.findFirst({where: {userId: user.id,expiry: {- lt: new Date(),+ gt: new Date(),},createdAt: {gt: new Date(Date.now() - ONE_HOUR),