|
|
|
|
@ -22,9 +22,7 @@ module.exports = {
|
|
|
|
|
state: conf.enableCSRFProtection
|
|
|
|
|
}, async (req, accessToken, refreshToken, profile, cb) => {
|
|
|
|
|
try {
|
|
|
|
|
const picture = _.get(profile, 'picture',
|
|
|
|
|
_.get(profile, 'avatar',
|
|
|
|
|
_.get(profile, 'profile.picture', _.get(profile, 'profile.avatar', ''))))
|
|
|
|
|
const picture = _.get(profile, conf.pictureClaim, '')
|
|
|
|
|
const user = await WIKI.models.users.processProfile({
|
|
|
|
|
providerKey: req.params.strategy,
|
|
|
|
|
profile: {
|
|
|
|
|
@ -32,7 +30,7 @@ module.exports = {
|
|
|
|
|
id: _.get(profile, conf.userIdClaim),
|
|
|
|
|
displayName: _.get(profile, conf.displayNameClaim, '???'),
|
|
|
|
|
email: _.get(profile, conf.emailClaim),
|
|
|
|
|
picture
|
|
|
|
|
picture: picture
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (conf.mapGroups) {
|
|
|
|
|
|