mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
fix: update token validity check
This commit is contained in:
@ -8,11 +8,12 @@ export const getResetTokenValidity = async ({ token }: GetResetTokenValidityOpti
|
||||
const found = await prisma.passwordResetToken.findFirst({
|
||||
select: {
|
||||
id: true,
|
||||
expiry: true,
|
||||
},
|
||||
where: {
|
||||
token,
|
||||
},
|
||||
});
|
||||
|
||||
return !!found;
|
||||
return !!found && found.expiry > new Date();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user