Skip to content

Commit e75d8d8

Browse files
committed
change loading message
1 parent 0691158 commit e75d8d8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

web-assets/js/setupAuth0WithRedirect.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,19 +597,23 @@ const authSetup = function () {
597597
}
598598

599599
function changeWindowMessage() {
600+
try {
601+
if ((!returnAppUrl && !appUrl) || ((returnAppUrl == 'undefined') && (appUrl == 'undefined'))) {
600602

601-
if ((!returnAppUrl && !appUrl) || ((returnAppUrl == 'undefined') && (appUrl == 'undefined'))) {
602-
try {
603603
var hdomain = location.hostname.split('.').reverse()[1];
604604
var linkurl = "http://" + window.location.host + "/?logout=true&retUrl=http://" + window.location.host;
605605
if (hdomain) {
606606
linkurl = "https://" + window.location.host + "/?logout=true&retUrl=https://" + hdomain + ".com";
607607
}
608608
document.getElementById("page-title-heading").innerHTML = "Alert";
609609
document.getElementById("loading_message_p").innerHTML = "Login/Logout action is not called. Please check return url (retUrl) value in query parameters or <a href=" + linkurl + ">click here</a>";
610-
} catch (err) {
611-
logger("Error in changing loading message: ", err.message)
610+
} else if (returnAppUrl || appUrl) {
611+
document.getElementById("loading_message_p").innerHTML = "Wait Login processing ...";
612+
} else if (shouldLogout) {
613+
document.getElementById("loading_message_p").innerHTML = "Wait Logout processing ...";
612614
}
615+
} catch (err) {
616+
logger("Error in changing loading message: ", err.message)
613617
}
614618
}
615619

0 commit comments

Comments
 (0)