Skip to Content

CookieOptions

Defined in: siwx-server/src/types.ts:212 

Attributes of the session cookie, used by createSessionCookie, createClearCookie and the @tuwaio/siwx-server/next handlers. The cookie is always HttpOnly.

Properties

domain?

optional domain?: string

Defined in: siwx-server/src/types.ts:232 

The cookie domain.


maxAge?

optional maxAge?: number

Defined in: siwx-server/src/types.ts:223 

Max-Age in seconds. createSessionCookie defaults to 604800 (7 days). The handlers use their ttlSeconds instead, and fall back to this value when ttlSeconds is not set.

Default

604800

name?

optional name?: string

Defined in: siwx-server/src/types.ts:217 

The name of the cookie.

Default

"siwx-session-v2"

path?

optional path?: string

Defined in: siwx-server/src/types.ts:228 

The cookie path.

Default

"/"

sameSite?

optional sameSite?: "Strict" | "Lax" | "None"

Defined in: siwx-server/src/types.ts:242 

The SameSite policy.

Default

"Strict"

secure?

optional secure?: boolean

Defined in: siwx-server/src/types.ts:237 

Whether to set the Secure flag.

Default

true
Last updated on