From 0fad9375543152d3d7034532bb531b97ed1f8485 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Mon, 27 Nov 2023 13:53:34 -0500 Subject: [PATCH] fix(striker-ui-api): move user to session cookie --- striker-ui-api/src/lib/request_handlers/auth/login.ts | 2 +- striker-ui-api/src/lib/request_handlers/auth/logout.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/striker-ui-api/src/lib/request_handlers/auth/login.ts b/striker-ui-api/src/lib/request_handlers/auth/login.ts index 9e687b78..d9f29a93 100644 --- a/striker-ui-api/src/lib/request_handlers/auth/login.ts +++ b/striker-ui-api/src/lib/request_handlers/auth/login.ts @@ -16,8 +16,8 @@ export const login: RequestHandler = ( response.cookie(cname('session'), { expires: session?.cookie?.expires, + user, }); - response.cookie(cname('user'), user); } response.status(204).send(); diff --git a/striker-ui-api/src/lib/request_handlers/auth/logout.ts b/striker-ui-api/src/lib/request_handlers/auth/logout.ts index 08106a4d..41ce263f 100644 --- a/striker-ui-api/src/lib/request_handlers/auth/logout.ts +++ b/striker-ui-api/src/lib/request_handlers/auth/logout.ts @@ -13,7 +13,6 @@ export const logout: RequestHandler = (request, response) => { response.clearCookie(cname('session')); response.clearCookie(cname('sid')); - response.clearCookie(cname('user')); return response.status(204).send(); });