const pwcheck = await bcrypt.compare(credentials.password, user.password);
회원기능 만들기 : 아이디/비번 + JWT 사용하기 수업에서 위와 같이 하니까 동작하지 않네요. 그래서 콘솔에 출력해서 확인해보니 user 프로퍼티에는 password 가 없네요. hash 로 바꿔주니까 제대로 동작하네요. 참고하세요!
const pwcheck = await bcrypt.compare(credentials.password, user.hash);