Skip to content

Commit

Permalink
fix(server:twitter): make sure IDs are strings
Browse files Browse the repository at this point in the history
closes #1997
  • Loading branch information
Awk34 committed Sep 13, 2016
1 parent 44dccba commit 5991a72
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export function setup(User, config) {
callbackURL: config.twitter.callbackURL
},
function(token, tokenSecret, profile, done) {
profile._json.id = `${profile._json.id}`;
profile.id = `${profile.id}`;

<% if(filters.mongooseModels) { %>User.findOne({'twitter.id': profile.id}).exec()<% }
if(filters.sequelizeModels) { %>User.find({where:{'twitter.id': profile.id}})<% } %>
.then(user => {
Expand Down

0 comments on commit 5991a72

Please sign in to comment.