Skip to content

Commit 5991a72

Browse files
committed
fix(server:twitter): make sure IDs are strings
closes #1997
1 parent 44dccba commit 5991a72

File tree

1 file changed

+3
-0
lines changed
  • templates/app/server/auth(auth)/twitter(twitterAuth)

1 file changed

+3
-0
lines changed

Diff for: templates/app/server/auth(auth)/twitter(twitterAuth)/passport.js

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export function setup(User, config) {
88
callbackURL: config.twitter.callbackURL
99
},
1010
function(token, tokenSecret, profile, done) {
11+
profile._json.id = `${profile._json.id}`;
12+
profile.id = `${profile.id}`;
13+
1114
<% if(filters.mongooseModels) { %>User.findOne({'twitter.id': profile.id}).exec()<% }
1215
if(filters.sequelizeModels) { %>User.find({where:{'twitter.id': profile.id}})<% } %>
1316
.then(user => {

0 commit comments

Comments
 (0)