From ed3925b1c52b4155e0595146837916db0d094e40 Mon Sep 17 00:00:00 2001 From: Beh Date: Thu, 30 Sep 2021 02:42:48 +0200 Subject: [PATCH] fix: use first email address in Rocket.Chat auth response (#3122) --- server/modules/authentication/rocketchat/authentication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/authentication/rocketchat/authentication.js b/server/modules/authentication/rocketchat/authentication.js index 944d667c..edffef00 100644 --- a/server/modules/authentication/rocketchat/authentication.js +++ b/server/modules/authentication/rocketchat/authentication.js @@ -23,7 +23,7 @@ module.exports = { cb(null, { id: usr._id, displayName: _.isEmpty(usr.name) ? usr.username : usr.name, - email: usr.email, + email: usr.emails[0].address, picture: usr.avatarUrl }) } catch (err) {