export function logoutClientSideOnly(ps: { goTo?: St, skipSend?: Bo } = {}) {
  Server.deleteTempSessId();

  ReactDispatcher.handleViewAction({
    actionType: actionTypes.Logout
  });

  if (eds.isInEmbeddedCommentsIframe && !ps.skipSend) {
    // Tell the editor iframe that we've logged out.
    // And maybe we'll redirect the embedd*ing* window.  [sso_redir_par_win]
    sendToOtherIframes(['logoutClientSideOnly', ps]);

    // Probaby not needed, since reload() below, but anyway:
    patchTheStore({ setEditorOpen: false });
    const sessWin: MainWin = getMainWin();
    delete sessWin.typs.weakSessionId;
    sessWin.theStore.me = 'TyMLOGDOUT' as any;
  }

  // Disconnect WebSocket so we won't receive data, for this user, after we've
  // logged out: (we reload() below — but the service-worker might stay connected)
  pubsub.disconnectWebSocket();

  if (ps.goTo) {
    if (eds.isInIframe) {
      // Then we'll redirect the parent window instead. [sso_redir_par_win]
    }
    else {
      location.assign(ps.goTo);
    }
    // If that for some reason won't do anything, then make sure we really forget
    // all logged in state anyway:
    setTimeout(function() {
      logW(`location.assign(${ps.goTo}) had no effect? Reloading anyway...`);
      location.reload();
    }, 2000);
  }
  else {
    // Quick fix that reloads the admin page (if one views it) so login dialog appears.
    // But don't do in the goTo if branch — apparently location.reload()
    // cancels location.assign(..) — even if done on the lines after (!).
    location.reload();
  }
}
According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization."