Skip to main content
Skip to main content

SessionOptions

Options to pass to express-session.

Properties

namestring
The name of the session ID cookie to set in the response (and read from in the request). The default value is connect.sid. Refer to express-session’s documentation for more details.
resaveboolean
Whether the session should be saved back to the session store, even if the session was never modified during the request. The default value is true. Refer to express-session’s documentation for more details.
rollingboolean
Whether the session identifier cookie should be force-set on every response. The default value is false. Refer to express-session’s documentation for more details.
saveUninitializedboolean
Whether a session that is "uninitialized" is forced to be saved to the store. The default value is true. Refer to express-session’s documentation for more details.
secretstring
The secret to sign the session ID cookie. By default, the value of cookie_secret is used. Refer to express-session’s documentation for details.
ttlnumber
Used when calculating the Expires Set-Cookie attribute of cookies. By default, its value is 10 * 60 * 60 * 1000. Refer to express-session’s documentation for details.
Was this section helpful?