From afb5d0883c1b0f5cf9a513b7a53b614922373b77 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 5 Aug 2019 11:07:07 +0200 Subject: [PATCH] . --- core/passport.js | 1 - modules/auth/auth.routes.js | 1 + modules/auth/auth.service.js | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) 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 }); },