Redirect back if you aren't logged in
This commit is contained in:
parent
84a0cdcbf6
commit
41cd64144a
|
@ -1,3 +1,9 @@
|
|||
if (localStorage.getItem("DONOTSHARE-secretkey") === null) {
|
||||
window.location.replace("/login")
|
||||
document.body.innerHTML = "Redirecting..."
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
function attempt() {
|
||||
if (document.getElementById("appidbox").value.match(/^[A-Za-z]+$/)) {
|
||||
fetch("https://auth.hectabit.org/api/newauth", {
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
<p>Sending data...</p>
|
||||
|
||||
<script>
|
||||
if (localStorage.getItem("DONOTSHARE-secretkey") !== null) {
|
||||
window.location.replace("/app" + window.location.search)
|
||||
document.body.innerHTML = "Redirecting..."
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
function oauth() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
|
||||
|
|
Reference in New Issue