Twitter/GitLab user data not being updated on sign in
For Twitter/GitLab, it looks like we only update the identity
that backs the user and not the user
itself. This means that if you change your username or avatar, it never gets updated when you sign in again.
- Calls
userService.findOrCreateUserForProvider(twitterUser, twitterIdentity)
,server/web/strategies/twitter.js#L36
-
findOrCreateUserForProvider
upserts the user object with$setOnInsert
(I think this should just be$set
),server/services/user-service.js#L140
Whereas with GitHub, we update the user object all the time, server/web/strategies/github-user.js#L68
To access Mongo locally:
$ mongo localhost:27017
> use gitter
> db.users.findOne({ username: 'MadLittleMods_gitlab' })