This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
passport.use('twitter', new TwitterStrategy({ | |
consumerKey: config.tw_consumer_key, | |
consumerSecret: config.tw_secret, | |
callbackURL: config.base_url + '/twitter/callback' | |
}, function (token, token_secret, profile, done) { | |
// twitter callback comes here to get the twuser obj | |
log.info('got twitter profile:', profile); | |
var TWUser = require('../models/twuser'); | |
// find the twitter obj if it exists | |
db.findTWUser({providerid: profile.id}, function (err, doc) { |
NewerOlder