Skip to content
VaultTerm
Browse docs

configuration-reference

Authentication & sessions

Token lifetimes, WebAuthn relying-party settings, SSO provider configuration, and social login — the variables that govern who can sign in and for how long.

Updated Jun 23, 2026

These variables govern authentication: how access and refresh tokens are signed and how long they live, how WebAuthn (passkeys / hardware keys) is bound to your domain, and how single sign-on and social login are configured. The single most important value is JWT_SECRET — under production a weak or default secret is a fatal boot guard, as described in Configuration overview.

JWT_SECRET=replace-with-a-long-random-secret-at-least-32-bytes
JWT_TTL=12h
REFRESH_TTL=30d
RP_ID=vault.example.com
RP_NAME=VaultTerm
RP_ORIGIN=https://vault.example.com
[email protected]

Tokens & sessions

VariableTypeDefaultDescription
JWT_SECRETstring (required)(dev default)Signing secret; must be at least 32 bytes and not the dev default under production (fatal boot guard otherwise).
JWT_TTLstring12hWeb access token lifetime.
DEVICE_ACCESS_TTLstring15mShort-lived access token for native clients.
REFRESH_TTLstring30dDevice refresh token lifetime.
REFRESH_REQUIRE_DEVICE_SIGboolean (0/1)0Require an Ed25519 device signature on refresh (reuse detection).
TENANT_STEPUP_TTL_SECnumber300Freshness window for sensitive actions (step-up re-authentication).
AUTH_RATE_MAXnumber30Max requests per window on unauthenticated auth endpoints.
AUTH_RATE_WINDOW_MSnumber60000Auth rate-limit window.

Web sessions use the short-lived JWT_TTL access token; native clients pair an even shorter DEVICE_ACCESS_TTL access token with a long-lived REFRESH_TTL refresh token. Turning on REFRESH_REQUIRE_DEVICE_SIG requires each refresh to carry an Ed25519 signature from the registered device, so a stolen refresh token alone cannot mint new access tokens. TENANT_STEPUP_TTL_SEC is the window after a step-up re-auth during which sensitive actions are permitted without prompting again.

WebAuthn

VariableTypeDefaultDescription
RP_IDstringlocalhostWebAuthn relying-party domain (registrable domain only, no scheme or port).
RP_NAMEstringVaultTermWebAuthn display name shown during registration.
RP_ORIGINcomma-separated(dev localhost origins)Allowed WebAuthn origins (HTTPS, or localhost).

RP_ID must be the registrable domain (for example vault.example.com, never a URL with a scheme or port), and every origin a user authenticates from must appear in RP_ORIGIN. Passkeys are bound to the relying party, so changing RP_ID invalidates previously registered credentials — set it correctly before users enroll.

SSO & social login

VariableTypeDefaultDescription
SSO_ADMIN_EMAILScomma-separated(empty)Emails allowed to configure per-org OIDC/SAML providers; empty locks the provider-config endpoints.
APPLE_TEAM_IDstring(empty)Sign in with Apple team id.
APPLE_KEY_IDstring(empty)Apple .p8 signing key id.
APPLE_PRIVATE_KEYPEM(empty)Apple .p8 private key; empty disables Apple sign-in.

SSO_ADMIN_EMAILS gates who can set up enterprise identity providers for an organization; leave it empty to lock provider configuration entirely. The Apple variables together enable Sign in with Apple — all three must be present, and APPLE_PRIVATE_KEY empty disables it. For enterprise IdP and directory sync, see SSO & SCIM.

If your IdP or metadata endpoint resolves to a private address, remember the egress guard: EGRESS_ALLOW_PRIVATE=1 must be set or the server-side fetch is blocked under production (see Core & database configuration).