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(
{
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

View file

@ -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)