-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Hi everyone (my first post here - thanks to all for the excellent work)
I'm having trouble redirecting to a dashboard page ('/me') after a successful facebook login.
I have tried setting the 'successRedirect' option in the passport.authenticate method with no luck.
// not working for me...
.get('/', passport.authenticate('facebook', {
successRedirect: '/me',
failureRedirect: '/signup',
session: false
}))
I have also tried updating the authCallback function in user.controller.js with
// not working for me...
exports.authCallback = function(req, res, next) {
res.redirect('/me');
};
All attempts so far just dump me out back at '/'.
I'm wondering if it has something to do with the catch-all in the routes?
// All other routes should redirect to the index.html
app.route('/*')
.get(function(req, res) {
res.sendfile(app.get('appPath') + '/index.html');
});
No doubt this is something I'm overlooking. Any help would be very much appreciated.
Metadata
Metadata
Assignees
Labels
No labels