add validation for used OTP codes

This commit is contained in:
dswbx
2025-11-07 09:12:58 +01:00
parent ee2ab982df
commit 7e399830e5

View File

@@ -294,6 +294,10 @@ async function getValidatedCode(
throw new OTPError("Code expired");
}
if (otpData.used_at) {
throw new OTPError("Code already used");
}
return otpData;
}