loginRequired.js 161 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 module.exports = function(req, res, next) { if (!req.isAuthenticated()){ res.redirect('/accounts/login'); }else{ return next(); } };