fix(session): set the correct TTL for the cookie store (#992)

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.

fix #991
This commit is contained in:
Gauthier
2024-10-02 20:59:35 +02:00
committed by GitHub
parent a5d22ba5b8
commit 96e1d40304

View File

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