diff options
Diffstat (limited to 'lib/auth.js')
-rw-r--r-- | lib/auth.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/auth.js b/lib/auth.js index 456c9dff..dc8b94ca 100644 --- a/lib/auth.js +++ b/lib/auth.js @@ -7,17 +7,18 @@ var GithubStrategy = require('passport-github').Strategy; var DropboxStrategy = require('passport-dropbox-oauth2').Strategy; //core -var User = require('./user.js') -var config = require('../config.js') +var User = require('./user.js'); +var config = require('../config.js'); +var logger = require("./logger.js"); function callback(accessToken, refreshToken, profile, done) { - //console.log(profile.displayName || profile.username); + //logger.info(profile.displayName || profile.username); User.findOrNewUser(profile.id, profile, function (err, user) { if (err || user == null) { - console.log('auth callback failed: ' + err); + logger.error('auth callback failed: ' + err); } else { - if(config.debug && user) - console.log('user login: ' + user._id); + if (config.debug && user) + logger.info('user login: ' + user._id); done(null, user); } }); |