removed unnecessary local strategy options;

This commit is contained in:
bill bittner 2017-11-30 15:13:17 -08:00
parent f16abf08c2
commit 7b7627ab27
2 changed files with 8 additions and 10 deletions

View file

@ -6,12 +6,11 @@ const { returnUserAndChannelInfo } = require('../helpers/authHelpers.js');
module.exports = new PassportLocalStrategy( module.exports = new PassportLocalStrategy(
{ {
usernameField : 'username', // username key in the request body usernameField: 'username',
passwordField : 'password', // password key in the request body passwordField: 'password',
session : false, // session : false,
passReqToCallback: true,
}, },
(req, username, password, done) => { (username, password, done) => {
logger.debug('logging user in'); logger.debug('logging user in');
return db return db
.User .User

View file

@ -5,12 +5,11 @@ const logger = require('winston');
module.exports = new PassportLocalStrategy( module.exports = new PassportLocalStrategy(
{ {
usernameField : 'username', // sets the custom name of parameters in the POST body message usernameField: 'username',
passwordField : 'password', // sets the custom name of parameters in the POST body message passwordField: 'password',
session : false, // set to false because we will use token approach to auth // 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
}, },
(req, username, password, done) => { (username, password, done) => {
logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`); logger.verbose(`new channel signup request. user: ${username} pass: ${password} .`);
let userInfo = {}; let userInfo = {};
// server-side validaton of inputs (username, password) // server-side validaton of inputs (username, password)