Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Problem with duration #144

Open
uinstinct opened this issue Apr 14, 2020 · 1 comment
Open

Problem with duration #144

uinstinct opened this issue Apr 14, 2020 · 1 comment

Comments

@uinstinct
Copy link

Problem with duration

I tried this multiple times and now I really don't understand why this is happening?

const sessions=require('client-sessions'); app.use(sessions({ cookieName: 'usersession', secret:'keeping it secret', duration:1000*60*2, }));

In the above code, the duration shoud be 2 minutes.

But, it looks strange in the cookies storage in my browser.

image

The cookie should expire in 2 minutes.

The browser I am using is Firefox Developer Edition.

I tried the same in chrome but it shows the same.

@mi-kas
Copy link

mi-kas commented Jul 7, 2020

I had the same problem and after setting maxAge to the duration you want, the cookie's expiration was set correctly in the browser.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants