使用Passport.js有没有办法让我为相同的路由指定多个身份验证提供程序?passport.js与多个身份验证提供程序?
例如(从护照指南)我可以在下面的示例路线上使用本地和Facebook和Twitter策略?
app.post('/login',
passport.authenticate('local'), /* how can I add other strategies here? */
function(req, res) {
// If this function gets called, authentication was successful.
// `req.user` contains the authenticated user.
res.redirect('/users/' + req.user.username);
});
你为什么希望多策略混合成一条路由后? – damphat