0
在快递我使用:快递/角,Passport身份验证后,没有进行重定向
var router = express.Router();
router.get('/auth/*', function (req, res, next) {
next();
})
app.use(router);
app.all('/*', function(req, res) {
res.sendfile('index.html', { root: __dirname + '/app/dist' });
});
及其在角$ routeProvider:
when('/auth/:type', {}).
当我使用社交登录聚会/auth/meetup
它验证,但不会按照successRedirect Passport中指定的/profile/meetup
重新路由:
app.get('/auth/meetup', passport.authenticate('meetup', { scope : 'email' }));
app.get('/auth/meetup/callback',
passport.authenticate('meetup', {
successRedirect : '/profile/meetup',
failureRedirect : '/login'
}));
当我点击一个带有href="/auth/meetup"
的按钮时,我在地址栏中显示一个空白的网址:http://localhost:2997/auth/meetup
刷新页面时,我自动路由到'/profile/meetup'
,以便验证成功。
为什么认证后Node/Express/Angular不会重定向到/ profile/meetup?