📜  控制器内的 passport.authenticate - Javascript 代码示例

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

代码示例1
//DECLARE DE REQUIRES

exports.createUser = (req, res, next) => {
    passport.authenticate('local-signup', {
        successRedirect : '/all', 
        failureRedirect : '/signup', 
        failureFlash : true 
    })(req, res, next); // -> IMPORTANT
};