diff --git a/core/passport.js b/core/passport.js index c0b18a8..3b31dd0 100644 --- a/core/passport.js +++ b/core/passport.js @@ -45,7 +45,6 @@ passport.use('local-email', new LocalStrategy(localEmailOptions, async (email, p if (_.isNull(user)) { return done(null, false, { message: 'User not found' }) } else { - var password_encoded = crypto.createHash('sha512').update(password).digest('hex'); const isPasswordValid = await user.comparePassword(password_encoded); if (!isPasswordValid) { diff --git a/modules/auth/auth.routes.js b/modules/auth/auth.routes.js index 1627b2f..01ec8ba 100644 --- a/modules/auth/auth.routes.js +++ b/modules/auth/auth.routes.js @@ -11,6 +11,7 @@ const AccessValidator = require('../../middlewares/accessValidator'); //const { ModelHandler } = require('sequelize-handlers'); //const postHandler = new ModelHandler(models.Post); +// [ADMIN] - LogiN routes.post('/auth', SchemaValidator(authValidation.LoginWinEmailInputType, true), AccessValidator.isRegisteredUserEmail, diff --git a/modules/auth/auth.service.js b/modules/auth/auth.service.js index 78cf5b3..bc147e0 100644 --- a/modules/auth/auth.service.js +++ b/modules/auth/auth.service.js @@ -7,7 +7,6 @@ const extraMethods = { findUser: async (params, context) => { return await models.User.findOne({ where: params, - raw: true, // <- para evitar tener que hacer .toJson al final }); },