From 1d68fea6cbc8ff3493f44ddb19e7777cbd929d1b Mon Sep 17 00:00:00 2001 From: mod242 <40213799+mod242@users.noreply.github.com> Date: Fri, 23 Jan 2026 11:30:27 +0100 Subject: [PATCH] Make Picture Claim configureable --- server/modules/authentication/oauth2/authentication.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/modules/authentication/oauth2/authentication.js b/server/modules/authentication/oauth2/authentication.js index fe4510e3..6ac3e830 100644 --- a/server/modules/authentication/oauth2/authentication.js +++ b/server/modules/authentication/oauth2/authentication.js @@ -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) {