Skip to content

Instantly share code, notes, and snippets.

@chad3814
chad3814 / gist:2778491
Created May 23, 2012 23:39
problem with passportjs
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) {