Skip to content

Commit ab04035

Browse files
committed
Merge pull request strongloop#104 from clarkorz/fix/dup-identity
Avoid duplicate user identities
2 parents 6ee3c80 + 75994f6 commit ab04035

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/models/user-identity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
return cb(err);
136136
}
137137
var date = new Date();
138-
userIdentityModel.create({
138+
userIdentityModel.findOrCreate({ where: { externalId: profile.id } }, {
139139
provider: provider,
140140
externalId: profile.id,
141141
authScheme: authScheme,

0 commit comments

Comments
 (0)