📜  护照本地猫鼬 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:43.307000             🧑  作者: Mango

代码示例1
// requires the model with Passport-Local Mongoose plugged in
const User = require('./models/user');

// use static authenticate method of model in LocalStrategy
passport.use(new LocalStrategy(User.authenticate()));

// use static serialize and deserialize of model for passport session support
passport.serializeUser(User.serializeUser());
passport.deserializeUser(User.deserializeUser());