mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 08:54:54 +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');
|
throw new BadRequestException('User already registered with given email');
|
||||||
}
|
}
|
||||||
const salt = this.helperHashService.randomSalt(10); // Hash the password using bcrypt
|
const salt = this.helperHashService.randomSalt(10); // Hash the password using bcrypt
|
||||||
const hashedPassword = this.helperHashService.bcrypt(
|
const hashedPassword = await this.helperHashService.bcrypt(
|
||||||
userSignUpDto.password,
|
userSignUpDto.password,
|
||||||
salt,
|
salt,
|
||||||
);
|
);
|
||||||
@ -124,7 +124,7 @@ export class UserAuthService {
|
|||||||
sessionId: session[1].uuid,
|
sessionId: session[1].uuid,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new UnauthorizedException('User unauthorized');
|
throw new BadRequestException('Invalid credentials');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user