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
19 changes: 19 additions & 0 deletions web-assets/js/setupAuth0WithRedirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const authSetup = function () {

const init = function () {
correctOldUrl();
changeWindowMessage();
createAuth0Client({
domain: domain,
client_id: clientId,
Expand Down Expand Up @@ -161,6 +162,13 @@ const authSetup = function () {
setCookie(tcJWTCookie, "", -1);
setCookie(v3JWTCookie, "", -1);
setCookie(tcSSOCookie, "", -1);

// to clear any old session
setCookie('auth0Jwt', "", -1);
setCookie('zendeskJwt', "", -1);
setCookie('auth0Refresh', "", -1);
// for scorecard
setCookie('JSESSIONID', "", -1);
};

const isLoggedIn = function () {
Expand Down Expand Up @@ -355,6 +363,17 @@ const authSetup = function () {

}

function changeWindowMessage() {
if ((!returnAppUrl && !appUrl) || ((returnAppUrl == 'undefined') && (appUrl == 'undefined'))) {
try {
document.getElementById("page-title-heading").innerHTML = "Alert";
document.getElementById("loading_message_p").innerHTML = "Login/Logout action is not called. Please check return url (retUrl) value in query parameters."
} catch (err) {
logger("Error in changing loading message: ", err.message)
}
}
}

// execute
init();
};
2 changes: 1 addition & 1 deletion web-assets/static-pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<main id="main" class="page-main">
<a id="contentarea" tabindex="-1"></a>
<h1 id="page-title-heading" class="page-title-heading">loading...</h1>
<p class="page-description">
<p class="page-description" id="loading_message_p">
Wait Login/Logout processing ...
</p>
</main>
Expand Down