Skip to content

buildAuthFromEnv

function buildAuthFromEnv<Action>(options): Promise<AuthFromEnv<Action>>;

Defined in: src/cli/index.ts:131

Build the auth + authorization providers from env:

  • AUTH_MODE=none (or empty / unset): anonymous, allow-all.
  • AUTH_MODE=basic: one Basic user from AUTH_USERNAME (default admin), AUTH_PASSWORD_HASH or AUTH_PASSWORD, with role AUTH_ROLE, and the product’s roles provider.
  • Anything else throws. A typo such as basci must not open the panel.
Type Parameter Default type
Action extends string string
Parameter Type
options AuthFromEnvOptions<Action>

Promise<AuthFromEnv<Action>>