You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
my case :
i'm using
app.use('/users', users);
for routing user based stuff like login andapp.use('/', routes);
for other thingsin 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
The text was updated successfully, but these errors were encountered: