added otp limiter

This commit is contained in:
unknown
2024-08-21 11:22:08 +03:00
parent 2581137f8b
commit 95a315db8f

View File

@ -42,7 +42,7 @@ export class UserAuthService {
throw new BadRequestException('User already registered with given email');
}
const salt = this.helperHashService.randomSalt(10); // Hash the password using bcrypt
const hashedPassword = this.helperHashService.bcrypt(
const hashedPassword = await this.helperHashService.bcrypt(
userSignUpDto.password,
salt,
);
@ -124,7 +124,7 @@ export class UserAuthService {
sessionId: session[1].uuid,
});
} catch (error) {
throw new UnauthorizedException('User unauthorized');
throw new BadRequestException('Invalid credentials');
}
}