Update saml_utils.js

pull/10084/head
Rodrigo Nascimento 8 years ago committed by GitHub
parent 548f21e1d7
commit 0a57ba4deb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/meteor-accounts-saml/saml_utils.js

@ -413,7 +413,7 @@ SAML.prototype.validateResponse = function(samlResponse, relayState, callback) {
}
}
if (!profile.email && profile.nameID && profile.nameIDFormat && profile.nameIDFormat.value.indexOf('emailAddress') >= 0) {
if (!profile.email && profile.nameID && (profile.nameIDFormat && profile.nameIDFormat.value != null ? profile.nameIDFormat.value : profile.nameIDFormat).indexOf('emailAddress') >= 0) {
profile.email = profile.nameID;
}
if (Meteor.settings.debug) {

Loading…
Cancel
Save