bradtraversy / nodekb

Simple knowledgebase app with Node.js, Express and MongoDB
304 stars 185 forks source link

I am only getting 'missing credentials' , What could be an issue? #3

Open binayakgourishankar opened 6 years ago

gauravnagar192 commented 6 years ago

the cause is that passport.js require name = "username" and name = "password" exactly same in login.pug if you put any other name it wont work

cvaditya1 commented 6 years ago

Solved by configuring the passport to use a different variable name.

passport.use(new LocalStrategy({
        usernameField: '<Custom Name>',
        passwordField: '<Custom Password>'
    }
...........