Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failureRedirect failed to redirect via route middleware #150

Open
SK-CSE opened this issue Dec 31, 2016 · 0 comments
Open

failureRedirect failed to redirect via route middleware #150

SK-CSE opened this issue Dec 31, 2016 · 0 comments

Comments

@SK-CSE
Copy link

SK-CSE commented Dec 31, 2016

my case :
i'm using app.use('/users', users); for routing user based stuff like login and app.use('/', routes); for other things
in the below code written in user route :
router.post('/login',
passport.authenticate('local',{successRedirect : '/', failureRedirect : 'users/login', failureFlash:true}),
function(req, res) {
res.redirect('/');
});
failureRedirect is redirecting me to http://localhost:3000/users/users/login instead of http://localhost:3000/users/login. successRedirect is working absolutely fine and redirect to root dashboard.
any suggestion would be appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant