Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CookieOptions

Defines the cookie options. Primarly used to specify the otpions when setting the sessionToken cookie which is used to pass session token from the client (e.g., browser) to the server (e.g., next.js, express) in an app where server side rendering is used.

export
interface

CookieOptions

Hierarchy

  • CookieOptions

Index

Properties

httpOnly: boolean

If set to true, forbids JavaScript from accessing the cookie.

maxAge: number

Indicates the number of seconds until the cookie expires. A zero or negative number will expire the cookie immediately.

path: string

Specifies the path that must exist in the requested URL for the browser to send the Cookie header.

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

Controls whether or not a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.

secure: boolean

If set to true, indicates that the cookie is sent to the server only when a request is made with the https: scheme (except on localhost), and therefore, is more resistant to man-in-the-middle attacks.

Generated using TypeDoc