我想将请求重定向到另一个URL,以及通过 passport 在里面 express
passport
express
app.get('/auth/facebook/callback', function (req, res, next) { var authenticator = passport.authenticate('facebook', { successRedirect: "http://localhost:3200/#/home/", failureRedirect: '/' });
问题是它不会重定向到指定的url和查询中的代码,这样我也可以在angular app中管理状态。
你应该把 passport.authenticate function (req, res, next) :
passport.authenticate
function (req, res, next)
app.get('/auth/facebook/callback', passport.authenticate('facebook', { successRedirect: "http://localhost:3200/#/home/", failureRedirect: '/' }));