aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/config/passport.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-27 13:23:56 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-27 13:23:56 +0200
commita367363d725795c5f0fe83ef3417db2bd3bd3915 (patch)
tree2ea4a1f53c05b6f2030140eb2755fa0e6d4eec21 /config/passport.js
parentfixed small bug (diff)
downloadDivid-a367363d725795c5f0fe83ef3417db2bd3bd3915.tar.gz
cleaned up some and added a bunch of comments
Diffstat (limited to 'config/passport.js')
-rw-r--r--config/passport.js8
1 files changed, 2 insertions, 6 deletions
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) {
}));
-
-
-
-
}