From a367363d725795c5f0fe83ef3417db2bd3bd3915 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Mon, 27 May 2013 13:23:56 +0200 Subject: cleaned up some and added a bunch of comments --- config/passport.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'config/passport.js') diff --git a/config/passport.js b/config/passport.js index e0be2d9..ae8d34a 100644 --- a/config/passport.js +++ b/config/passport.js @@ -37,7 +37,7 @@ module.exports = function (passport, config) { if (err) return done(err); if (!user) return done(null, false, { message: 'Unknown user' }); if (!user.authenticate(password)) return done(null, false, { message: 'Invalid password' }); - return done(null, user); + return done(null, user); // yay! }); })); @@ -48,7 +48,7 @@ module.exports = function (passport, config) { User.findOne({ _id: access.user }, function(err, user) { if (err) return done(err); if (!user) return done(null, false, { message: 'Unknown user' }); - return done(null, user); + return done(null, user); // yay! }); }); })); @@ -115,9 +115,5 @@ module.exports = function (passport, config) { })); - - - - } -- cgit v1.2.3