Skip logout bootbox modal?


(Matt McNeil) #1

As I’m using a custom SSO logout sequence, I’m wondering if it’s possible to skip the display of the logout bootbox modal. Here’s my current implementation:

  Discourse.logout = function() {
    Discourse.User.logout(); // <-- any way to do this silently?
    Discourse.KeyValueStore.abandonLocal();
    window.location.href = "https://example.com/sign_out";
  };

Ideally I’d like to be able to call a JS method that does all of the Discourse logout (clears cookie, etc) and then redirects to my SSO sign out page without flashing an intermediate modal.