auth0/node-samlp

User claims like email, surname and givenname are not optional

yesvivek opened this issue · 0 comments

PassportProfileMapper User claims like email, surname and givenname are mandatory now. Could these made as optional? There could be some SP to which one might wish to not send these claims.

Modifying as given below works for me,

lib/claims/PassportProfileMapper.js:42

claims[fm.email]      = this._pu.emails && this._pu.emails[0] && this._pu.emails[0].value;
claims[fm.name]       = this._pu.displayName;
claims[fm.givenname]  = this._pu.name && this._pu.name.givenName;
claims[fm.surname]    = this._pu.name && this._pu.name.familyName;