From 02e5e3e92a85b31749d3f5314e1e5fee8109b1ba Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Sat, 30 Mar 2024 02:47:42 -0400 Subject: [PATCH] fix: set cookie expiry to match expiry of api key --- app/routes/login.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/routes/login.tsx b/app/routes/login.tsx index 198a262..0c2f7fd 100644 --- a/app/routes/login.tsx +++ b/app/routes/login.tsx @@ -82,7 +82,9 @@ export async function action({ request }: ActionFunctionArgs) { return redirect('/machines', { headers: { // eslint-disable-next-line @typescript-eslint/naming-convention - 'Set-Cookie': await commitSession(session) + 'Set-Cookie': await commitSession(session, { + maxAge: expiresIn + }) } }) } catch (error) {