Make Picture Claim configureable

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

@ -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) {

Loading…
Cancel
Save