aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/config/passport.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-24 18:01:23 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-24 18:01:23 +0200
commit794a54482900c0e83fa17d738ac16ad265e1ac05 (patch)
treebbe3fe9cb3dbcb72019a048a42756e167caf7df9 /config/passport.js
parentfixed small bug in 4cec8e5 (diff)
downloadDivid-794a54482900c0e83fa17d738ac16ad265e1ac05.tar.gz
removed some logging and changed a redirect
Diffstat (limited to '')
-rw-r--r--config/passport.js3
1 files changed, 0 insertions, 3 deletions
diff --git a/config/passport.js b/config/passport.js
index 75f42e8..e0be2d9 100644
--- a/config/passport.js
+++ b/config/passport.js
@@ -42,10 +42,8 @@ module.exports = function (passport, config) {
}));
passport.use(new HashStrategy({ passReqToCallback: true }, function(req, hash, done) {
- console.log('TRYNG ' + hash);
Access.findOne({ randomToken: hash }, function(err, access) {
if (err) return done(err);
- console.log(access);
if (!access) return done(null, false, { message: 'Unknown link' });
User.findOne({ _id: access.user }, function(err, user) {
if (err) return done(err);
@@ -68,7 +66,6 @@ module.exports = function (passport, config) {
// looks up the user in the database. Will create the user if it does not exist
User.findOne({ 'facebook.id': profile.id }, function(err, user) {
if(err) return done(err);
- console.log(profile);
if (!user) {
user = new User({
name: profile.displayName