Skip to content

Commit

Permalink
fix: added helper alias for missing object property in ubuntu sso
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Apr 23, 2024
1 parent 0597207 commit ad30479
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ class Passport extends KoaPassport {
refreshToken = null;
if (!_.isArray(profile.nickname) || !isSANB(profile.nickname[0]))
return done(new Error(this.config.phrases.INVALID_PROFILE_ID));
// helper alias to re-use existing function which has plural form
if (_.isArray(profile.email) && !_.isEmpty(profile.email))
profile.emails = profile.email;
}

if (!_.isObject(profile))
Expand Down

0 comments on commit ad30479

Please sign in to comment.