mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 10:24:53 +00:00
added otp limiter
This commit is contained in:
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user