Documentation menu

AuthKit

AuthKit configuration

Configure AuthKit-Lite databases, JWTs, passkeys, demo data, and application lifecycle settings.

Updated

Configuration sources

Runnable defaults live in src/main/resources/application.properties. A root .env file is imported when present; copy .env.example and uncomment only the overrides you need. Environment-specific values must stay outside version control.

Database

Database environment variables
VariableDefaultPurpose
DB_URLIn-memory H2External JDBC URL, typically MySQL
DB_USERNAMEsaDatabase user
DB_PASSWORDEmpty for H2Database password

JWT and refresh tokens

JWT environment variables
VariableDefaultPurpose
JWT_SECRETEphemeral startup valueHS256 signing secret; use a stable high-entropy value in production
JWT_ACCESS_TOKEN_TTL15mAccess-token lifetime
JWT_REFRESH_TOKEN_TTL14dRefresh-token lifetime
JWT_ISSUERauthkitExpected iss claim
JWT_AUDIENCEauthkit-apiExpected aud claim

Passkeys / WebAuthn

Passkey environment variables
VariableDefaultPurpose
PASSKEY_ENABLEDfalseEnable WebAuthn support
PASSKEY_RP_NAMEBuildBaseKit AuthKit-LiteHuman-readable relying-party name
PASSKEY_RP_IDlocalhostRelying-party domain boundary
PASSKEY_ALLOWED_ORIGINSlocalhost ports 8080 and 3000Comma-separated trusted browser origins

Application options

Other environment variables
VariableDefaultPurpose
AUTHKIT_DEMO_DATA_ENABLEDtrueSeed demo users only when the users table is empty
SHUTDOWN_TIMEOUT30sGraceful shutdown phase timeout

Application profiles

The released project does not ship separate named runtime profiles. Local defaults are directly runnable, production values are supplied as external configuration, and tests use src/test/resources/application.properties with isolated H2 and demo data disabled.

Production checklist

  • Provide a stable JWT_SECRET of at least 32 characters.
  • Use an external database and managed backups.
  • Set AUTHKIT_DEMO_DATA_ENABLED=false.
  • Serve passkeys over HTTPS with the deployed RP ID and exact trusted origins.
  • Keep secrets in the deployment platform's secret store.
  • Add rate limiting, monitoring, and application-specific authorization review.