CookieOptions
CookieOptions:
Object
Type declaration
domain?
optionaldomain:string
Domain name for the cookie. Defaults to the domain name of the app.
expires?
optionalexpires:Date
Expiry date of the cookie in GMT. If not specified or set to 0, creates a session cookie.
httpOnly?
optionalhttpOnly:boolean
Flags the cookie to be accessible only by the web server.
maxAge?
optionalmaxAge:number
Convenient option for setting the expiry time relative to the current time in milliseconds.
partitioned?
optionalpartitioned:boolean
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#partitioned
path?
optionalpath:string
Path for the cookie. Defaults to “/”.
sameSite?
optionalsameSite:CookieSameSiteProperty
Value of the “SameSite” Set-Cookie attribute.
Link
https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.1.1.
secure?
optionalsecure:boolean
Marks the cookie to be used with HTTPS only.
signed?
optionalsigned:boolean
Indicates if the cookie should be signed.
value
value:
string
The underlying value of the cookie.