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
disableSilentLogin
• Optional
disableSilentLogin: boolean
Description
Disables ability for the client to authenticate with Keycloak silently
Default
false
Defined in
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
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
routePaths
• Optional
routePaths: CustomRouteUrl
Description
Used if the API server uses custom auth route paths
Default
{
* _prefix: "/auth";
* ...
* }