Interface SessionCookieOptions

interface SessionCookieOptions {
    domain?: string;
    name?: string;
    path?: string;
    sameSite?: "lax" | "strict" | "none";
    secure?: boolean;
    transient?: boolean;
}

Properties

domain?: string

Specifies the value for the Set-Cookie attribute. By default, no domain is set, and most clients will consider the cookie to apply to only the current domain.

name?: string

The name of the session cookie.

Default: __session.

path?: string

The path attribute of the session cookie. Will be set to '/' by default.

sameSite?: "lax" | "strict" | "none"

The sameSite attribute of the session cookie.

Default: lax.

secure?: boolean

The secure attribute of the session cookie.

Default: depends on the protocol of the application's base URL. If the protocol is https, then true, otherwise false.

transient?: boolean

The transient attribute of the session cookie. When true, the cookie will not persist beyond the current session.