passport-local-mongoose: createStrategy is not a function / authenticate is not a function
问题 I'm building on top of this starter project and trying to add user login with passport-local-mongoose. Depending on which of the two ways I try to use the strategy I'm getting either this error: [1] passport.use(User.createStrategy()); [1] ^ [1] TypeError: User.createStrategy is not a function or this error: [1] passport.use(new LocalStrategy(User.authenticate())); [1] ^ [1] TypeError: User.authenticate is not a function I've tried googling around a lot for a solution but can't seem to find