diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-06-27 16:09:38 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-06-27 16:09:38 +1000 |
commit | b61cf4bdcdd3be62392b689d8a2b47f3250acc67 (patch) | |
tree | 48ae24989d1b70a429aa0f225be78c39f21c8e34 | |
parent | Token in localStorage must be JSON (diff) | |
download | server-b61cf4bdcdd3be62392b689d8a2b47f3250acc67.tar.xz |
the cookie name is being a bitch?
-rw-r--r-- | slowcord/public/login.html | 4 | ||||
-rw-r--r-- | slowcord/src/index.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/slowcord/public/login.html b/slowcord/public/login.html index def2c786..ba49ecf8 100644 --- a/slowcord/public/login.html +++ b/slowcord/public/login.html @@ -124,9 +124,9 @@ document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)')?.pop() || '' ); - let token = getCookieValue("oauth-discord"); + let token = getCookieValue("token"); if (token.trim().length) { - document.cookie = "oauth-discord="; // don't care + document.cookie = "token="; // don't care window.localStorage.setItem("token", `"${token}"`); window.location.href = "/app"; } diff --git a/slowcord/src/index.ts b/slowcord/src/index.ts index afa21e6a..e32651fb 100644 --- a/slowcord/src/index.ts +++ b/slowcord/src/index.ts @@ -104,7 +104,7 @@ app.get("/oauth/:type", async (req, res) => { const token = await generateToken(user.id); - res.cookie("oauth-discord", token, { signed: true }); + res.cookie("token", token, { signed: true }); res.sendFile(path.join(__dirname, "../public/login.html")); }); |