-
-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
A cookie's Max-Age is the number of seconds until expiration, so the following code doesn't do what the author intended.
const hour = 3600000
const twoWeeks = 14 * 24 * hour
const myCookie = cookie.serialize('my_cookie', 'lolHi', {
secure: true,
httpOnly: true,
path: '/',
maxAge: twoWeeks,
})
An hour is 60*60=3600 seconds, it looks like this code is treating the max age as milliseconds.
Metadata
Metadata
Assignees
Labels
No labels