feat: add verify otp endpoint

This commit is contained in:
2026-02-26 09:14:30 +03:30
parent b9adbef7e8
commit 8212ede785
7 changed files with 65 additions and 7 deletions
+3 -2
View File
@@ -84,8 +84,9 @@ export class OtpService {
throw new UnauthorizedException('OTP expired');
}
// TODO: Compared hashed otp
if (otp.code !== code) {
const isOTPCorrect = await this.hashingProvider.compare(code, otp.code);
if (!isOTPCorrect) {
throw new UnauthorizedException('Invalid OTP');
}