From eeb48162936e1495e918998f3fb3e74bee0668f4 Mon Sep 17 00:00:00 2001 From: Maxime FRIESS Date: Sun, 24 Mar 2024 19:11:25 +0100 Subject: [PATCH] Added OAUTH2_USER_ATTR_EMAIL_APPEND --- .../sharelatex_diff/AuthenticationController.js.diff | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldap-overleaf-sl/sharelatex_diff/AuthenticationController.js.diff b/ldap-overleaf-sl/sharelatex_diff/AuthenticationController.js.diff index 5705a43..995880c 100644 --- a/ldap-overleaf-sl/sharelatex_diff/AuthenticationController.js.diff +++ b/ldap-overleaf-sl/sharelatex_diff/AuthenticationController.js.diff @@ -1,4 +1,4 @@ -268a268,364 +268a269,365 > > // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > oauth2Redirect(req, res, next) { @@ -62,7 +62,7 @@ > const profile = await profileResponse.json() > console.log("OAuth2 user profile", JSON.stringify(profile)) > -> const email = profile[process.env.OAUTH2_USER_ATTR_EMAIL ?? "email"] +> const email = profile[process.env.OAUTH2_USER_ATTR_EMAIL ?? "email"] + (process.env.OAUTH2_USER_ATTR_EMAIL_APPEND ?? '') > const uid = profile[process.env.OAUTH2_USER_ATTR_UID ?? "uid"] > const firstname = profile?.[process.env.OAUTH2_USER_ATTR_FIRSTNAME] ?? email > const lastname = process.env.OAUTH2_USER_ATTR_LASTNAME