Closed patrick-hofmann closed 4 weeks ago
Hi @patrick-hofmann
Actually we use maxAge
to set the cookie expiration, see https://github.com/unjs/h3/blob/7324eeec854eecc37422074ef9f2aec8a5e4a816/src/utils/session.ts#L141
As the session is stored in the cookie, it expires at the same time the cookie expires.
Hi @atinux
you are right, indeed session and cookie lifetime are equal in the current example. Nevertheless this documentation PR also shows why I've created the two PRs
and
Best regards!
I've added a note and example since it is not obvious that maxAge of the session is not the same as maxAge of the cookie