Class that encapsulates the configuration for the auth package.

Example

import { Config } from "@tailor-platform/auth/core";

export const config = new Config({
apiHost: "http://yourapp.mini.tailor.tech:8000",
appHost: "http://localhost:3000",
});

Each of these properties in config to specific environment variables or constants you need to define in your application's environment.

Collectively, they form the configuration necessary for the client to handle user authentication in a standardized manner.

Name Required Description Default
apiHost Yes Tailor Platform host
appHost Yes Frontend app host
unauthorizedPath Path to be redirected if not authorized /unauthorized
loginPath Auth service endpoint to initiate login /auth/login
tokenPath Auth service endpoint to issue a session token /auth/token
refreshTokenPath Auth service refresh token endpoint /auth/token/refresh
userInfoPath Auth service endpoint to fetch basic user information /auth/userinfo

Constructors

Properties

Constructors

Properties

params: Pick<ContextConfig, "apiHost" | "appHost"> & Partial<ContextConfig>
strategies: AbstractStrategy[] = ...
strategyMap: Map<string, AbstractStrategy>

Generated using TypeDoc