This commit is contained in:
Benjamin Toby 2026-03-12 13:52:34 +00:00
parent 109939f6db
commit 97b135c352
3 changed files with 10 additions and 12 deletions

View File

@ -116,15 +116,17 @@ export default async function loginUser({
const { auth_key_cookie_name, csrf_cookie_name } = grabCookieNames();
const host = req.headers.host;
setCookie(res, [
{
name: auth_key_cookie_name,
value: encrypted_payload || "",
options: {
secure: req.headers.origin !== "localhost",
secure: host !== "localhost",
path: "/",
expires: expiration_date,
domain: req.headers.origin,
domain: host,
},
},
{
@ -133,7 +135,7 @@ export default async function loginUser({
options: {
path: "/",
expires: expiration_date,
domain: req.headers.origin,
domain: host,
},
},
]);

View File

@ -15,19 +15,21 @@ export default async function logoutUser({
}: Params): Promise<APIResponseObject> {
const { auth_key_cookie_name, csrf_cookie_name } = grabCookieNames();
const host = req.headers.host;
deleteCookie(res, [
{
name: auth_key_cookie_name,
options: {
path: "/",
domain: req.headers.origin,
domain: host,
},
},
{
name: csrf_cookie_name,
options: {
path: "/",
domain: req.headers.origin,
domain: host,
},
},
]);

View File

@ -1,8 +1,2 @@
DSQL_ENCRYPTION_PASSWORD=
DSQL_ENCRYPTION_SALT=
WEB_SOCKET_PORT=3773
PORT=3772
HOST=http://localhost:46079
DOMAIN=localhost
DSQL_ENCRYPTION_SALT=