Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. module.exports = function (req, res, next) {
  2. // Initialize Passport
  3. passport.initialize()(req, res, function () {
  4. // Use the built-in sessions
  5. passport.session()(req, res, function () {
  6. // Make the user available throughout the frontend
  7. res.locals.user = req.user;
  8.  
  9. next();
  10. });
  11. });
  12. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement