Skip to content

config properties session properties cookie

GitHub Action edited this page Sep 4, 2024 · 3 revisions

Version

v1.0.3

cookie Type

object (Details)

cookie Properties

Property Type Required Nullable Defined by
domain string Optional cannot be null Config
http_only boolean Optional cannot be null Config
name string Optional cannot be null Config
same_site string Optional cannot be null Config
secure boolean Optional cannot be null Config

domain

domain is the domain the cookie will be bound to. Works for subdomains, but not cross-domain. See the session.enable_auth_token_header configuration instead if the API and the client application run on different domains.

domain

  • is optional

  • cannot be null

domain Type

string

domain Default Value

The default value is:

"hanko"

http_only

http_only determines whether cookies are HTTP only or accessible by Javascript.

http_only

  • is optional

  • cannot be null

http_only Type

boolean

http_only Default Value

The default value is:

true

name

name is the name of the cookie.

name

  • is optional

  • cannot be null

name Type

string

name Default Value

The default value is:

"hanko"

same_site

same_site controls whether a cookie is sent with cross-site requests. See here for more details.

same_site

  • is optional

  • cannot be null

same_site Type

string

same_site Constraints

enum: the value of this property must be equal to one of the following values:

Value Explanation
"strict"
"lax"
"none"

same_site Default Value

The default value is:

"strict"

secure

secure indicates whether the cookie is sent to the server only when a request is made with the https: scheme (except on localhost).

NOTE: secure must be set to false when working on localhost and with the Safari browser because it does not store secure cookies on localhost.

secure

  • is optional

  • cannot be null

secure Type

boolean

secure Default Value

The default value is:

true
Clone this wiki locally