init(config)
Parameters
config
:
- These will override the ones specified in the
config.yaml
file:
hosts: string
- ;
separated string for all the locations of SuperTokens instances.
accessTokenPath: string
- See access_token_path
in the config.yaml file
refreshTokenPath: string
- See refresh_api_path
in the config.yaml file
cookieDomain: string
- See cookie_domain
in the config.yaml file
cookieSecure: *bool
- See cookie_secure
in the config.yaml file
cookieSameSite: string
- See cookie_same_site
in the config.yaml file
apiKey
- Specify any one of the API keys that you have set in the config.yaml.
Returns
- A middleware function that can be given to
app.use()
. This function handles refreshing of sessions automatically.
Throws