Actually Fix Account Deletion
This commit is contained in:
parent
33e66635c3
commit
109955f7f9
1 changed files with 2 additions and 2 deletions
|
|
@ -85,13 +85,13 @@ async function deleteAccount() {
|
||||||
|
|
||||||
let expiryStr = sessionStorage.getItem("authExpires");
|
let expiryStr = sessionStorage.getItem("authExpires");
|
||||||
if (expiryStr) { // Expiry exists so token should exist
|
if (expiryStr) { // Expiry exists so token should exist
|
||||||
|
token = sessionStorage.getItem("authToken");
|
||||||
|
|
||||||
let expiry = new Date(expiryStr);
|
let expiry = new Date(expiryStr);
|
||||||
if (expiry < new Date()) { // Expired token
|
if (expiry < new Date()) { // Expired token
|
||||||
window.location.href = "/account/login?redirect=/account"
|
window.location.href = "/account/login?redirect=/account"
|
||||||
} else if (!token) { // Expiry Saved but No Token (shouldn't be possible but it'll be caught if it happens)
|
} else if (!token) { // Expiry Saved but No Token (shouldn't be possible but it'll be caught if it happens)
|
||||||
window.location.href = "/account/login?redirect=/account"
|
window.location.href = "/account/login?redirect=/account"
|
||||||
} else {
|
|
||||||
token = sessionStorage.getItem("authToken");
|
|
||||||
}
|
}
|
||||||
} else { // Token Never Saved in Session
|
} else { // Token Never Saved in Session
|
||||||
window.location.href = "/account/login?redirect=/account"
|
window.location.href = "/account/login?redirect=/account"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue