@ -159,7 +159,9 @@ export default function(UserIdent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(/github/).test(provider)) {
|
if (!(/github/).test(provider)) {
|
||||||
user[getSocialProvider(provider)] = profile.username;
|
debug('setting social', provider, (/github/g).test(provider));
|
||||||
|
debug('profile username', profile.username);
|
||||||
|
user[provider] = profile.username;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if user signed in with github refresh their info
|
// if user signed in with github refresh their info
|
||||||
|
@ -72,25 +72,20 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"default": ""
|
"default": ""
|
||||||
},
|
},
|
||||||
"linkedinProfile": {
|
"linkedin": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"default": ""
|
|
||||||
},
|
},
|
||||||
"githubProfile": {
|
"codepen": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"default": ""
|
|
||||||
},
|
},
|
||||||
"codepenProfile": {
|
"twitter": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"default": ""
|
|
||||||
},
|
},
|
||||||
"twitterHandle": {
|
"facebook": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"default": ""
|
|
||||||
},
|
},
|
||||||
"facebookProfile": {
|
"google": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"default": ""
|
|
||||||
},
|
},
|
||||||
"completedBonfires": {
|
"completedBonfires": {
|
||||||
"type": [
|
"type": [
|
||||||
|
@ -11,6 +11,7 @@ var uuid = require('node-uuid'),
|
|||||||
passportProviders = require('./passport-providers');
|
passportProviders = require('./passport-providers');
|
||||||
|
|
||||||
var setProfileFromGithub = require('./utils/auth').setProfileFromGithub;
|
var setProfileFromGithub = require('./utils/auth').setProfileFromGithub;
|
||||||
|
var getSocialProvider = require('./utils/auth').getSocialProvider;
|
||||||
var generateKey =
|
var generateKey =
|
||||||
require('loopback-component-passport/lib/models/utils').generateKey;
|
require('loopback-component-passport/lib/models/utils').generateKey;
|
||||||
|
|
||||||
@ -67,7 +68,7 @@ var passportOptions = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(/github/).test(provider)) {
|
if (!(/github/).test(provider)) {
|
||||||
userObj[provider.split('-')[0]] = profile.username;
|
userObj[getSocialProvider(provider)] = profile.username;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/github/.test(provider)) {
|
if (/github/.test(provider)) {
|
||||||
|
Reference in New Issue
Block a user