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 <ryan@sct.dev>
This commit is contained in:
Gauthier
2025-03-04 01:09:48 +01:00
committed by GitHub
parent ef36477c1f
commit 73f700e2e5

View File

@@ -157,7 +157,7 @@ app
}, },
store: new TypeormStore({ store: new TypeormStore({
cleanupLimit: 2, cleanupLimit: 2,
ttl: 1000 * 60 * 60 * 24 * 30, ttl: 60 * 60 * 24 * 30,
}).connect(sessionRespository) as Store, }).connect(sessionRespository) as Store,
}) })
); );