From e331c710dab0419ebf20f017d858e4e1d12b5dc0 Mon Sep 17 00:00:00 2001 From: mod242 <40213799+mod242@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:46:08 +0100 Subject: [PATCH] Make Picture / Avatar available --- server/modules/authentication/oauth2/authentication.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/modules/authentication/oauth2/authentication.js b/server/modules/authentication/oauth2/authentication.js index ce66c3db..fe4510e3 100644 --- a/server/modules/authentication/oauth2/authentication.js +++ b/server/modules/authentication/oauth2/authentication.js @@ -22,13 +22,17 @@ 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 user = await WIKI.models.users.processProfile({ providerKey: req.params.strategy, profile: { ...profile, id: _.get(profile, conf.userIdClaim), displayName: _.get(profile, conf.displayNameClaim, '???'), - email: _.get(profile, conf.emailClaim) + email: _.get(profile, conf.emailClaim), + picture } }) if (conf.mapGroups) {