79261537

Date: 2024-12-07 22:48:47
Score: 2.5
Natty:
Report link

Please share the client code which triggers the otp sending. And as well the logs of this

      const storedOtp = await prisma.otp.findFirst({
        where: { email, otp },
        orderBy: { createdAt: "desc" },
      });

      // add debugging
      console.log('OTP: ', otp)
      console.log('storedOtp: ', storedOtp)
      console.log('Email: ', email)

      if (
        !storedOtp ||
        new Date() - new Date(storedOtp.createdAt) > 10 * 60 * 1000
      ) {
        return res.status(400).json({ message: "Invalid or expired OTP" });
      }
Reasons:
  • RegEx Blacklisted phrase (2.5): Please share
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: rizzling