log test login

This commit is contained in:
sdraris 2025-09-22 13:07:33 +02:00
parent 64ec020cc8
commit ceaf615a24

View File

@ -50,8 +50,11 @@ export class AuthService {
if (!user) { if (!user) {
throw new UnauthorizedException('Email invalide'); throw new UnauthorizedException('Email invalide');
} }
console.log("Tentative login:", dto.email, JSON.stringify(dto.password));
console.log("Utilisateur trouvé:", user.email, user.password);
const isMatch = await bcrypt.compare(dto.password, user.password); const isMatch = await bcrypt.compare(dto.password, user.password);
console.log("Résultat bcrypt.compare:", isMatch);
if (!isMatch) { if (!isMatch) {
throw new UnauthorizedException('Mot de passe invalide'); throw new UnauthorizedException('Mot de passe invalide');
} }