Commit 089f533
committed
fix: auth cookie expiring too early
When not set in an environment variable, `COOKIE_EXPIRES_IN` will default to `60 * 60 * 24 * 7` = 604,800s = 7 days, since the `Max-Age` cookie attribute is specified in seconds:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#max-agenumber
However, the `res.cookie` function takes the `maxAge` **in milliseconds**. which means that the previous amount of seconds actually meant *604.8 seconds* ~= 10 minutes. Oof.1 parent ad199fa commit 089f533
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
0 commit comments