From 7b7627ab2751edae3c535ce0669f64ccc9e6fdf1 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Thu, 30 Nov 2017 15:13:17 -0800 Subject: [PATCH] removed unnecessary local strategy options; --- passport/local-login.js | 9 ++++----- passport/local-signup.js | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/passport/local-login.js b/passport/local-login.js index 37a1cb67..5910d96a 100644 --- a/passport/local-login.js +++ b/passport/local-login.js @@ -6,12 +6,11 @@ const { returnUserAndChannelInfo } = require('../helpers/authHelpers.js'); module.exports = new PassportLocalStrategy( { - usernameField : 'username', // username key in the request body - passwordField : 'password', // password key in the request body - session : false, - passReqToCallback: true, + usernameField: 'username', + passwordField: 'password', + // session : false, }, - (req, username, password, done) => { + (username, password, done) => { logger.debug('logging user in'); return db .User diff --git a/passport/local-signup.js b/passport/local-signup.js index 48f48e37..def287a1 100644 --- a/passport/local-signup.js +++ b/passport/local-signup.js @@ -5,12 +5,11 @@ const logger = require('winston'); module.exports = new PassportLocalStrategy( { - usernameField : 'username', // sets the custom name of parameters in the POST body message - passwordField : 'password', // sets the custom name of parameters in the POST body message - session : false, // set to false because we will use token approach to auth - passReqToCallback: true, // we want to be able to read the post body message parameters in the callback + usernameField: 'username', + passwordField: 'password', + // session: false, // set to false because we will use token approach to auth }, - (req, username, password, done) => { + (username, password, done) => { logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`); let userInfo = {}; // server-side validaton of inputs (username, password)