Change default value to empty array

This commit is contained in:
l.fernandes 2024-05-02 09:48:19 +01:00
parent f45d822b28
commit a8bc2035ba

View File

@ -37,7 +37,7 @@ module.exports = {
useCookieInsteadOfSession: keyArray.length > 0,
cookieEncryptionKeys: keyArray
}, async (req, iss, sub, profile, cb) => {
const emails = _.get(profile, '_json.emails', null);
const emails = _.get(profile, '_json.emails', [])
const id = _.get(profile, '_json.sub', null);
const usrEmail = _.get(profile, '_json.email', null) || _.get(profile, '_json.preferred_username') || emails[0]