0
どのようにパスポート局所戦略のチェックはとてもので、なぜ地元の戦略を作成するために同じことを確認することができ、私はまた私の地元の関数を呼び出すことができパスポート
// passport involved code
app.post('/login',
passport.authenticate('local'),
function(req, res) {
// If this function gets called, authentication was successful.
// `req.user` contains the authenticated user.
res.redirect('/users/' + req.user.username);
});
カスタムコード対パスポート局所戦略
// custom checking function
app.post('/login',
customfunctionhere,
function(req, res) {
// If this function gets called, authentication was successful.
// `req.user` contains the authenticated user.
res.redirect('/users/' + req.user.username);
});