This commit is contained in:
aditya.siregar
2024-10-27 19:48:10 +07:00
parent 758df918ae
commit 081a1aa27b
13 changed files with 190 additions and 35 deletions
+3 -3
View File
@@ -51,9 +51,9 @@ func (u *AuthServiceImpl) AuthenticateUser(ctx context.Context, email, password
return nil, errors.ErrorUserIsNotFound
}
//if ok := u.crypto.CompareHashAndPassword(user.Password, password); !ok {
// //return nil, errors.ErrorUserInvalidLogin
//}
if ok := u.crypto.CompareHashAndPassword(user.Password, password); !ok {
return nil, errors.ErrorUserInvalidLogin
}
signedToken, err := u.crypto.GenerateJWT(user.ToUser())