mean-stripdown icon indicating copy to clipboard operation
mean-stripdown copied to clipboard

Authorization config in the middlewares redirecting to the wrong route

Open ramgp opened this issue 11 years ago • 0 comments

/config/middlewares/authorization.js

exports.requiresLogin = function (req, res, next) {
  if (!req.isAuthenticated()) {
    return res.redirect('/login') //this should redirect to /signin
  }
  next()
};

After changing that, when doing any task that requires authenticatioin (login/signin) such as create() a league throws an error when you try to create a league without first being authenticated user, when it should redirect to the login (signin) view. Authentication process is not working properly

ramgp avatar Sep 15 '13 03:09 ramgp