Explorar o código

fix: use first email address in Rocket.Chat auth response (#3122)

Beh %!s(int64=3) %!d(string=hai) anos
pai
achega
ed3925b1c5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/modules/authentication/rocketchat/authentication.js

+ 1 - 1
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) {