From 880ad6a1f71332e586cbaff1a7550bdb424194bb Mon Sep 17 00:00:00 2001 From: Amos Haviv Date: Wed, 12 Feb 2014 18:29:46 +0200 Subject: [PATCH] Spliting Strategies --- app/models/user.js | 1 - config/strategies/google.js | 2 +- config/strategies/linkedin.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/user.js b/app/models/user.js index 3e0f822b0e..9b0398f1be 100755 --- a/app/models/user.js +++ b/app/models/user.js @@ -30,7 +30,6 @@ var UserSchema = new Schema({ type: String, default: '', trim: true, - unique: true }, username: { type: String, diff --git a/config/strategies/google.js b/config/strategies/google.js index 053e1e327d..15b5acbade 100644 --- a/config/strategies/google.js +++ b/config/strategies/google.js @@ -22,7 +22,7 @@ module.exports = function() { lastName: profile.name.familyName, displayName: profile.displayName, email: profile.emails[0].value, - username: profile.username, + username: profile.emails[0].value, provider: 'google', providerData: profile._json }); diff --git a/config/strategies/linkedin.js b/config/strategies/linkedin.js index 61c8222542..a7f38b0709 100644 --- a/config/strategies/linkedin.js +++ b/config/strategies/linkedin.js @@ -23,7 +23,7 @@ module.exports = function() { lastName: profile.name.familyName, displayName: profile.displayName, email: profile.emails[0].value, - username: profile.username, + username: profile.emails[0].value, provider: 'linkedin', providerData: profile._json });