linking accounts now works.

bug, need to change how loopback generates provider string.
This commit is contained in:
Berkeley Martinez
2015-08-12 16:25:52 -07:00
parent a4e220e2bc
commit fc29c1fd9b
7 changed files with 80 additions and 8 deletions

View File

@@ -66,6 +66,10 @@ var passportOptions = {
userObj.email = email;
}
if (!(/github/).test(provider)) {
userObj[provider.split('-')[0]] = profile.username;
}
if (/github/.test(provider)) {
setProfileFromGithub(userObj, profile, profile._json);
}