Log out of Manager

   Journey Manager (JM) The transaction engine for the platform. |   System Manager / DevOps |  All versions This feature is related to all versions.

Explicitly logging out of Journey Manager is important in a few use cases. One example is using Single Sign-OnSingle sign-on (SSO) is a property of access control of multiple related, yet independent, software systems. With this property, a user logs in with a single ID and password to gain access to any of several related systems. with a 3rd-party application. If the 3rd-party application user can logout, then login as a different user, the 3rd-party application user is now different than the Manager user.

Here is the actual example that drove the creation of this page: User A logs into Salesforce, gets an SSO account in Manager and passively logs in to Manager. User A then exits the Manager form and logs out of Salesforce. User B then logs in to Salesforce in the same browser. Because the User A, a login session is still running, User B's form is prefilled with User A's data.

The solution is to explicitly log out of Manager when the user exits the form. Here is a non-exhaustive list of possible places where this should be done:

  • Cancel or Exit
  • Form Submission
  • The before unload or unload browser events.

To logout of Manager, make a GET request to the /logout path from the appropriate form space, which does the following:

  • Logs the user out of Manager.
  • Clears the Manager-related cookies.

A sample JavaScript code is shown below:

/* Logout of Journey Manager. */
function logoutTMInstance() {
    console.debug("Start Manager logout");
    var href = window.location.href;
    var arr = href.split("/");
    var url = arr[0] + '\/\/' + arr[2] + '\/' + arr[3] + '\/logout.htm';
    var xmlHttp = new XMLHttpRequest();
    /* Call service synchronously. Change 3rd parameter to "true" for an asynchronous call. */
    xmlHttp.open( "GET", url, false);
    xmlHttp.send(null);
    console.debug("Manager logout complete");
};

Next, learn how to log in to Manager.