Make Picture / Avatar available

pull/7908/head
mod242 2 weeks ago committed by GitHub
parent e331c710da
commit c91c76f89f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -24,6 +24,10 @@ module.exports = {
acrValues: conf.acrValues
}, async (req, iss, uiProfile, idProfile, context, idToken, accessToken, refreshToken, params, cb) => {
const profile = Object.assign({}, idProfile, uiProfile)
const picture = _.get(profile, 'picture',
_.get(profile, '_json.picture',
_.get(profile, '_json.avatar',
_.get(profile, '_json.profile.picture', _.get(profile, '_json.profile.avatar', '')))))
try {
const user = await WIKI.models.users.processProfile({
@ -31,7 +35,8 @@ module.exports = {
profile: {
...profile,
email: _.get(profile, '_json.' + conf.emailClaim),
displayName: _.get(profile, '_json.' + conf.displayNameClaim, '')
displayName: _.get(profile, '_json.' + conf.displayNameClaim, ''),
picture
}
})
if (conf.mapGroups) {

Loading…
Cancel
Save