|
|
|
@ -89,8 +89,7 @@
|
|
|
|
|
<a href="#" class="mb-4 link font-medium js-loginButton" target="_blank">Reauthenticate</a>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</main>
|
|
|
|
|
<script>
|
|
|
|
|
(function () {
|
|
|
|
|
<script>(function () {
|
|
|
|
|
let loginButtons = document.querySelectorAll(".js-loginButton");
|
|
|
|
|
let fetchingUrl = false;
|
|
|
|
|
|
|
|
|
@ -112,8 +111,6 @@
|
|
|
|
|
nextUrl.search = nextParams.toString()
|
|
|
|
|
const url = nextUrl.toString();
|
|
|
|
|
|
|
|
|
|
const tab = window.open("/redirect", "_blank");
|
|
|
|
|
|
|
|
|
|
fetch(url, {
|
|
|
|
|
method: "POST",
|
|
|
|
|
headers: {
|
|
|
|
@ -128,14 +125,11 @@
|
|
|
|
|
}
|
|
|
|
|
const url = res["url"];
|
|
|
|
|
if (url) {
|
|
|
|
|
authUrl = url;
|
|
|
|
|
tab.location = url;
|
|
|
|
|
tab.focus();
|
|
|
|
|
document.location.href = url;
|
|
|
|
|
} else {
|
|
|
|
|
location.reload();
|
|
|
|
|
}
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
tab.close();
|
|
|
|
|
alert("Failed to log in: " + err.message);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -143,8 +137,7 @@
|
|
|
|
|
Array.from(loginButtons).forEach(el => {
|
|
|
|
|
el.addEventListener("click", handleClick);
|
|
|
|
|
})
|
|
|
|
|
})();
|
|
|
|
|
</script>
|
|
|
|
|
})();</script>
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
</html>
|
|
|
|
|