Token in localStorage must be JSON
This commit is contained in:
parent
6ead04def1
commit
3ac4953a0b
@ -127,7 +127,7 @@
|
|||||||
let token = getCookieValue("oauth-discord");
|
let token = getCookieValue("oauth-discord");
|
||||||
if (token.trim().length) {
|
if (token.trim().length) {
|
||||||
document.cookie = "oauth-discord="; // don't care
|
document.cookie = "oauth-discord="; // don't care
|
||||||
window.localStorage.setItem("token", token);
|
window.localStorage.setItem("token", `"${token}"`);
|
||||||
window.location.href = "/app";
|
window.location.href = "/app";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +152,7 @@
|
|||||||
|
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
if (json.token) {
|
if (json.token) {
|
||||||
window.localStorage.setItem("token", json.token);
|
window.localStorage.setItem("token", `"${json.token}"`);
|
||||||
window.location.href = "/app";
|
window.location.href = "/app";
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user