Added missing tokenSecret when new twitter account is created

This commit is contained in:
Sahat Yalkabov
2013-12-10 01:56:43 -05:00
parent 86952ebac0
commit 734c4e6741

View File

@@ -71,7 +71,7 @@ passport.use(new TwitterStrategy(config.twitter, function(accessToken, tokenSecr
if (existingUser) return done(null, existingUser);
var user = new User();
user.twitter = profile.id;
user.tokens.push({ kind: 'twitter', token: accessToken });
user.tokens.push({ kind: 'twitter', token: accessToken, tokenSecret: tokenSecret });
user.profile.name = profile.displayName;
user.profile.location = profile._json.location;
user.profile.picture = profile._json.profile_image_url;