0

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

Dhana Lakshmi
  • 393
  • 1
  • 10
  • 32

1 Answers1

0

you can simple render your view with calling path..

res.render('pages/about');
kj007
  • 6,073
  • 4
  • 29
  • 47