mean-stripdown
mean-stripdown copied to clipboard
Authorization config in the middlewares redirecting to the wrong route
/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