Skip to Content
API referenceSIWX ServerSrcInterfacesCookieOptions

API Reference — @tuwaio/siwx (CAIP-122 Authentication Layer)


CookieOptions

Defined in: packages/siwx-server/src/types.ts:169 

Options for cookie session serialization.

Properties

domain?

optional domain?: string

Defined in: packages/siwx-server/src/types.ts:188 

The cookie domain.


maxAge?

optional maxAge?: number

Defined in: packages/siwx-server/src/types.ts:179 

Max age in seconds. Defaults to 7 days for durable, 30 minutes for demo.

Default

604800

name?

optional name?: string

Defined in: packages/siwx-server/src/types.ts:174 

The name of the cookie.

Default

"siwx-session-v2"

path?

optional path?: string

Defined in: packages/siwx-server/src/types.ts:184 

The cookie path.

Default

"/"

sameSite?

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

Defined in: packages/siwx-server/src/types.ts:198 

The SameSite policy.

Default

"Strict"

secure?

optional secure?: boolean

Defined in: packages/siwx-server/src/types.ts:193 

Whether to set the Secure flag.

Default

true
Last updated on