diff --git a/src/routes/auth/auth.service.ts b/src/routes/auth/auth.service.ts index 1c27f15..215dd23 100644 --- a/src/routes/auth/auth.service.ts +++ b/src/routes/auth/auth.service.ts @@ -49,13 +49,13 @@ export class AuthService { throw new UnauthorizedException('Email invalide'); } - // const isMatch = await bcrypt.compare(dto.password, user.password); - // if (!isMatch) { - // throw new UnauthorizedException('Mot de passe invalide'); - // } - if (user.password !== dto.password) { + const isMatch = await bcrypt.compare(dto.password, user.password); + if (!isMatch) { throw new UnauthorizedException('Mot de passe invalide'); } + // if (user.password !== dto.password) { + // throw new UnauthorizedException('Mot de passe invalide'); + // } return this.generateTokens(user.id, user.email, user.role); } catch (error) {