Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/meteor-accounts-saml/saml_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ const middleware = function(req, res, next) {
throw new Error(`Unable to validate response url: ${ err }`);
}

const credentialToken = profile.inResponseToId || profile.InResponseTo || samlObject.credentialToken;
const credentialToken = (profile.inResponseToId && profile.inResponseToId.value) || profile.inResponseToId || profile.InResponseTo || samlObject.credentialToken;
if (!credentialToken) {
// No credentialToken in IdP-initiated SSO
const saml_idp_credentialToken = Random.id();
Expand Down
2 changes: 1 addition & 1 deletion packages/meteor-accounts-saml/saml_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ SAML.prototype.validateResponse = function(samlResponse, relayState, callback) {
}
}

if (!profile.email && profile.nameID && profile.nameIDFormat && profile.nameIDFormat.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) {
Expand Down