Skip to Content

CookieOptions

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

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:209 

The cookie domain.


maxAge?

optional maxAge?: number

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

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:194 

The name of the cookie.

Default

"siwx-session-v2"

path?

optional path?: string

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

The cookie path.

Default

"/"

sameSite?

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

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

The SameSite policy.

Default

"Strict"

secure?

optional secure?: boolean

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

Whether to set the Secure flag.

Default

true
Last updated on