vvo / iron-session

🛠 Secure, stateless, and cookie-based session library for JavaScript

Home Page:https://get-iron-session.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to create a session cookie

Arjan-Zuidema opened this issue · comments

How do I make the cookie expire at the end of the session?

I tried multiple combinations of -1, 0, undefined, null with ttl and expires but nothing seems to work. The inspector always shows an expire date while it should say Session in the expires column.

@vvo @brc-dd anyone? Cannot seem to find any docs about this.

Try cookieOptions: { maxAge: undefined }

Looks like that did the trick, thanks 👌🏼