Skip to content

Commit

Permalink
fix(session): set the correct TTL for the cookie store
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gauthier-th committed Oct 2, 2024
1 parent a5d22ba commit a5be32b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
);
Expand Down

0 comments on commit a5be32b

Please sign in to comment.