Skip to main content

Interface: ClientConfig

Properties

apiServerOrigin

Optional apiServerOrigin: string

Description

Set the API server's origin if different from the current page's origin to prevent CORS errors

Example

"http://localhost:4000"

Default

self.location.origin

Defined in

types.ts:21


disableSilentLogin

Optional disableSilentLogin: boolean

Description

Disables ability for the client to authenticate with Keycloak silently

Default

false

Defined in

types.ts:36


fastInitialAuthCheck

Optional fastInitialAuthCheck: boolean

Desc

When true, the client will not perform a network request to confirm login status if the user has a valid access token, resulting in an immediate login in some instances.

Default

false

Defined in

types.ts:53


logger

Optional logger: Logger

Pass a logger to the client. This is useful for debugging and logging.

Example

import pino from "pino";
const logger = pino();

const client = new KCClient({logger});

Defined in

types.ts:46


routePaths

Optional routePaths: CustomRouteUrl

Description

Used if the API server uses custom auth route paths

Default

{
* _prefix: "/auth";
* ...
* }

Defined in

types.ts:30