Thursday 11 February 2016

How to modify local authentication of passport.js?

I'm trying to change the local object from a Local Strategy of passport.js in a way below.Here you can download live example.Here is an example of userSchema from passport:var userSchema = mongoose.Schema({ local: { email: String, password: String } }); I want to modify that example into this:var userSchema = mongoose.Schema({ local: { id: String, user: { email: String, password: String } } }); And then I want to work with the user object on authentication, but I got this error: node_modules\bcrypt-nodejs\bCrypt.js:642 throw "Incorrect arguments";

Submitted February 11, 2016 at 12:27PM by GodOfTheMetal

No comments:

Post a Comment