[FIX] Random errors on SAML logout (#17227)

pull/17207/head^2
pierre-lehnen-rc 6 years ago committed by GitHub
parent b5b74e8aa8
commit 7692896441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/meteor-accounts-saml/client/saml_client.js

@ -58,8 +58,12 @@ Meteor.logoutWithSaml = function(options/* , callback*/) {
MeteorLogout.apply(Meteor);
return;
}
// Remove the userId from the client to prevent calls to the server while the logout is processed.
// If the logout fails, the userId will be reloaded on the resume call
Meteor._localStorage.removeItem(Accounts.USER_ID_KEY);
// A nasty bounce: 'result' has the SAML LogoutRequest but we need a proper 302 to redirected from the server.
// window.location.replace(Meteor.absoluteUrl('_saml/sloRedirect/' + options.provider + '/?redirect='+result));
window.location.replace(Meteor.absoluteUrl(`_saml/sloRedirect/${ options.provider }/?redirect=${ encodeURIComponent(result) }`));
});
};

Loading…
Cancel
Save