auth 인증로그
This commit is contained in:
@@ -37,7 +37,7 @@ export class AuthService {
|
||||
private readonly verificationService: VerificationService,
|
||||
private readonly jwtService: JwtService,
|
||||
private readonly configService: ConfigService,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
/**
|
||||
* 유저 로그인
|
||||
@@ -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('아이디 또는 비밀번호가 틀렸습니다');
|
||||
|
||||
Reference in New Issue
Block a user