Skip to content

Commit 138f39c

Browse files
author
sachin-maheshwari
authored
Merge pull request #94 from topcoder-platform/dev
alert for github signup
2 parents 4148b3a + 1f8ea3b commit 138f39c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

web-assets/js/setupAuth0WithRedirect.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ const authSetup = function () {
8989
return;
9090
} else if (!isLoggedIn() && returnAppUrl) {
9191
login();
92+
} else if (qs['error'] && qs['state']) {
93+
logger("Error in executing callback(): ", qs['error_description']);
94+
showLoginError(qs['error_description'], appUrl);
9295
} else {
9396
logger("User already logged in", true);
9497
postLogin();
@@ -455,6 +458,15 @@ const authSetup = function () {
455458
return hostname;
456459
}
457460

461+
function showLoginError(message, linkUrl) {
462+
try {
463+
document.getElementById("page-title-heading").innerHTML = "Alert";
464+
document.getElementById("loading_message_p").innerHTML = message + " <a href=" + linkUrl + ">click here</a>";
465+
} catch (err) {
466+
logger("Error in changing loading message: ", err.message)
467+
}
468+
}
469+
458470
// execute
459471
init();
460472
};

0 commit comments

Comments
 (0)