Skip to content

Instantly share code, notes, and snippets.

@Shekharrajak
Created July 16, 2015 05:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shekharrajak/3004e107a5e754f77538 to your computer and use it in GitHub Desktop.
Save Shekharrajak/3004e107a5e754f77538 to your computer and use it in GitHub Desktop.
For the tutorial on medium.com : passportJS auth
module.exports = function(req, res, next) {
if (req.isAuthenticated()) {
return next();
}
else{
return res.redirect('/login');
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment