问题描述:

U am using passport Facebook to authenticate the application on success callback how to redirect to the desired URL

router.get('/auth/facebook/callback',

passport.authenticate('facebook', {

successRedirect : '/success',

failureRedirect: '/'

}),

on success i am routing to /success

router.get('/success', function(req, res){

res.render({ url:"http://localhost:8000/#/"});

});

if i use the above code i am getting the error has

Failed to lookup view "[object Object]" in views directory "D:\project1\bookish\AdminBookPublisherRefractor/app/views"

I actually don't know how to redirect to a url any suggestion

网友答案:

you can simple render your view with calling path..

res.render('pages/about');
相关阅读:
Top