Skip to content

Commit

Permalink
fix(session): set the correct TTL for the cookie store (fallenbagel#992)
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 fallenbagel#991
  • Loading branch information
gauthier-th authored and bonswouar committed Nov 10, 2024
1 parent 58b7236 commit a97731c
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 a97731c

Please sign in to comment.