using the following code to set a cookie in my expressJS backend.
Edit The package I am using is 'cookie-session'. https://www.npmjs.com/package/cookie-session I should have specified this my bad. But no setting maxAge to null did not work. The cookie is still there when I reopen the browser.
app.use(
cookieSession({
secret: 'secretmonkey',
secure: false,
maxAge: null,
}),
);
I read that if maxAge is set to null the cookie should be deleted automatically when browser is closed.
What happens (using chrome) is that the cookie persists.