Skip to content

Commit

Permalink
rollback passport manager
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgehl3n committed Nov 17, 2023
1 parent c030ad7 commit 5631e03
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/middlewares/authentication/PassportManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export default class PassportManager {
const user = await UserService.GetByEmail(email);
if (user) {
bcrypt.compare(password, user.encriptedPassword, (err, res) => {
// if (res || err) {
if (res || err) {
this.SerializeUser();
this.DeserializeUser();
done(null, user);
// } else {
// return done(null, false, { message: 'Credenciais inválidas!' });
// }
} else {
return done(null, false, { message: 'Credenciais inválidas!' });
}
});
}
}));
Expand Down

0 comments on commit 5631e03

Please sign in to comment.