auth 인증로그

This commit is contained in:
2025-12-12 15:46:13 +09:00
parent f62e73aaaf
commit feb795ea91

View File

@@ -58,6 +58,9 @@ export class AuthService {
throw new UnauthorizedException('아이디 또는 비밀번호가 틀렸습니다'); //HTTP 401 상태 코드 예외
}
// 3. 비밀번호 비교 (bcrypt)
const tempHash = await bcrypt.hash(userPassword, 10);
console.log('=========input password bcrypt hash========:', tempHash);
const isPasswordValid = await bcrypt.compare(userPassword, user.userPw);
if (!isPasswordValid) {
throw new UnauthorizedException('아이디 또는 비밀번호가 틀렸습니다');