OptionalabsoluteOptionalbeforeA predicate function that decides whether the session should be rolled for an
incoming request. Return false to skip rolling the session for that request.
May be synchronous or asynchronous.
Allows you to filter and optimize requests to the session store. Only consulted
when rolling is enabled. If the hook throws or rejects, the SDK fails open and
rolls the session as usual.
Default: undefined (the session is always rolled).
OptionalcookieThe options for the session cookie.
OptionalinactivityThe duration of inactivity after which the session will expire. The value must be specified in seconds.
The session will be extended as long as it was active before the inactivity duration has been reached.
Default: 1 day.
OptionalrollingA boolean indicating whether rolling sessions should be used or not.
When enabled, the session will continue to be extended as long as it is used within the inactivity duration.
Once the upper bound, set via the absoluteDuration, has been reached, the session will no longer be extended.
Default: true.
The absolute duration after which the session will expire. The value must be specified in seconds.
Once the absolute duration has been reached, the session will no longer be extended.
Default: 3 days.