From 73f700e2e5ff0ee65f816bc8ea7132b5c1c6c8ed Mon Sep 17 00:00:00 2001 From: Gauthier Date: Tue, 4 Mar 2025 01:09:48 +0100 Subject: [PATCH] fix: set the correct TTL for the cookie store (#3946) The time-to-live (TTL) of cookies stored in the database was incorrect because the connect-typeorm library takes a TTL in seconds and not milliseconds, making cookies valid for ~82 years instead of 30 days. Co-authored-by: Ryan Cohen --- server/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/index.ts b/server/index.ts index 10ca10329..97f05ab1c 100644 --- a/server/index.ts +++ b/server/index.ts @@ -157,7 +157,7 @@ app }, store: new TypeormStore({ cleanupLimit: 2, - ttl: 1000 * 60 * 60 * 24 * 30, + ttl: 60 * 60 * 24 * 30, }).connect(sessionRespository) as Store, }) );