Auth Config schemas of the ObjectStack System Protocol: AdvancedAuthConfig and 11 more — each property with its type, default and a TypeScript example.
Who may self-register: invite_only (default — operator acts only), email_domain (allowlisted email domains), or open (anyone). email_domain forces email verification on; open forces it on unless the deployment explicitly sets emailAndPassword.requireEmailVerification to false.
allowedEmailDomains
string[]
optional
Email domains admitted to self-register under posture email_domain (exact, case-insensitive match; subdomains need their own entries). Required non-empty for email_domain; refused under other postures.
selfRegistrationPermissionSet
string
optional
Name of the permission set granted to each self-registrant. Required when posture is email_domain or open; refused for invite_only. admin_full_access is refused.
Trusted origins for CSRF protection. Supports wildcards (e.g. "https://*.example.com"). The baseUrl origin is always trusted implicitly.
trustedAppSchemes
string[]
optional
Native-app URI schemes the mobile sign-in hand-off may redirect a one-time token to (e.g. ["com.example.app"]). A hand-off to any other scheme is refused with 400 VALIDATION_ERROR and no redirect; absent or empty means the hand-off is not offered
SSO-only login: hide the local password form + self-registration, and refuse to give an IdP-provisioned user a local password (a platform administrator may still set their own; the break-glass password endpoint stays enabled)
Enable RFC 8628 Device Authorization Grant (CLI / TV-style login)
admin
boolean
optional
Enable the better-auth admin plugin: create-user, impersonation and the vendor admin routes (set-role, list-users, …). Ban/unban, unlock and set-password are served without it. Unset: forced on by effective SCIM (ADR-0134), otherwise off. An explicit false beside effective SCIM is a conflict refused at construction time.
phoneNumber
boolean
optional (default: false)
Enable phone-number sign-in (phone + password; OTP sign-in/reset when an SMS service is configured)
scim
boolean
optional
Enable the SCIM 2.0 provisioning surface. Unset: OS_SCIM_ENABLED decides (absent = off); an explicit value wins over the env var. Effective SCIM forces the admin plugin on when admin is unset; an explicit admin: false beside effective SCIM is refused at construction time.
sso
boolean
optional
Enable enterprise SSO (domain-routed OIDC/SAML sign-in). Unset: OS_SSO_ENABLED decides (absent = off); an explicit value wins over the env var.
ssoDomainVerification
boolean
optional
Enable DNS domain-verification for SSO providers (requires sso). Unset: OS_SSO_DOMAIN_VERIFICATION decides (absent = off); an explicit value wins over the env var.
Require email verification before creating a session
minPasswordLength
number
optional
Minimum password length (default 8)
maxPasswordLength
number
optional
Maximum password length (default 128)
resetPasswordTokenExpiresIn
number
optional
Reset-password token TTL in seconds (default 3600) (unit per better-auth emailAndPassword.resetPasswordTokenExpiresIn)
autoSignIn
boolean
optional
Auto sign-in after sign-up (default true)
revokeSessionsOnPasswordReset
never
optional
[REMOVED] emailAndPassword.revokeSessionsOnPasswordReset was removed in @objectstack/spec 18 (ADR-0049 enforce-or-remove) — it could hold only one value: a completed password reset always ends every session the account holds, on every reset door, and no setting turns that off. Delete the key; nothing replaces it.
Who may self-register: invite_only (default — operator acts only), email_domain (allowlisted email domains), or open (anyone). email_domain forces email verification on; open forces it on unless the deployment explicitly sets emailAndPassword.requireEmailVerification to false.
allowedEmailDomains
string[]
optional
Email domains admitted to self-register under posture email_domain (exact, case-insensitive match; subdomains need their own entries). Required non-empty for email_domain; refused under other postures.
selfRegistrationPermissionSet
string
optional
Name of the permission set granted to each self-registrant. Required when posture is email_domain or open; refused for invite_only. admin_full_access is refused.
Enable RFC 8628 Device Authorization Grant (CLI / TV-style login)
admin
boolean
optional
Enable the better-auth admin plugin: create-user, impersonation and the vendor admin routes (set-role, list-users, …). Ban/unban, unlock and set-password are served without it. Unset: forced on by effective SCIM (ADR-0134), otherwise off. An explicit false beside effective SCIM is a conflict refused at construction time.
phoneNumber
boolean
optional (default: false)
Enable phone-number sign-in (phone + password; OTP sign-in/reset when an SMS service is configured)
scim
boolean
optional
Enable the SCIM 2.0 provisioning surface. Unset: OS_SCIM_ENABLED decides (absent = off); an explicit value wins over the env var. Effective SCIM forces the admin plugin on when admin is unset; an explicit admin: false beside effective SCIM is refused at construction time.
sso
boolean
optional
Enable enterprise SSO (domain-routed OIDC/SAML sign-in). Unset: OS_SSO_ENABLED decides (absent = off); an explicit value wins over the env var.
ssoDomainVerification
boolean
optional
Enable DNS domain-verification for SSO providers (requires sso). Unset: OS_SSO_DOMAIN_VERIFICATION decides (absent = off); an explicit value wins over the env var.
Require email verification before creating a session
minPasswordLength
number
optional
Minimum password length (default 8)
maxPasswordLength
number
optional
Maximum password length (default 128)
resetPasswordTokenExpiresIn
number
optional
Reset-password token TTL in seconds (default 3600) (unit per better-auth emailAndPassword.resetPasswordTokenExpiresIn)
autoSignIn
boolean
optional
Auto sign-in after sign-up (default true)
revokeSessionsOnPasswordReset
never
optional
[REMOVED] emailAndPassword.revokeSessionsOnPasswordReset was removed in @objectstack/spec 18 (ADR-0049 enforce-or-remove) — it could hold only one value: a completed password reset always ends every session the account holds, on every reset door, and no setting turns that off. Delete the key; nothing replaces it.
A registered native-app URI scheme: lowercase, reverse-domain (two or more non-empty labels joined by single dots, the first starting with a letter), written bare (e.g. com.example.app)