Skip to content

Configuration Schema

The current config model is organized by top-level groups:

  • server
  • tokens
  • i18n
  • branding
  • registration
  • account_deletion
  • logging
  • security
  • database
  • auth
  • email
  • identity_providers
  • clients
  • users
  • terms
  • scheduler
  • cleanup
  • openapi
  • frontend (standalone only)

frontend and frontend.html_variables are standalone-only settings. They are parsed by @tinyauth/standalone and are not part of the backend’s declarative config contract.

FieldTypeDefaultDescription
enabledbooleanfalseCanonical self-registration switch. It gates password signup and first-time OAuth signup.
allowed_email_patternsstring[][]Optional email filters checked only when enabled is true. If omitted or empty, signup is unrestricted.
email_verification_requiredbooleantrueRequires email verification for password signups.
signup_noticeRecord<string, string>{}Localized HTML-capable notice text for implicit consent terms.

Use an array to configure external OAuth providers. Omit the field or use [] when none are configured.

FieldTypeDescription
idstringUnique provider identifier.
type'github' | 'google' | 'apple' | 'generic_oauth'Provider type.
enabledbooleanEnables the provider.
display_namestringDisplay label for the login button. Required for generic_oauth.
icon_urlstringOptional icon URL.
client_idstringOAuth client ID.
client_secretstringOAuth client secret.
authorization_urlstringAuthorization endpoint for generic_oauth.
token_urlstringToken endpoint for generic_oauth.
userinfo_urlstring | nullUserinfo endpoint for generic_oauth.
email_urlstringEmail endpoint when required by the provider.
scopesstring[]Requested OAuth scopes.
email_conflict_strategy'auto_link' | 'require_link'Handling for email collisions with existing accounts.
FieldTypeDescription
idstringUnique identifier for the term.
requiredbooleanWhether accepting the term is mandatory.
consent_mode'explicit' | 'implicit'Consent collection mode.
versionstringVersion string used for re-consent tracking.
contentRecord<string, { title, type, content }>Localized term content.

Within each localized content item, type must be link or text.

FieldTypeDefaultDescription
enabledbooleantrueEnables the live OpenAPI routes GET /api/docs and GET /api/docs/json.
titlestring'TinyAuth API'OpenAPI document title.
descriptionstring'OpenID Connect Provider API'OpenAPI document description.
ui_titlestring'TinyAuth API Reference'Browser page title for the live Scalar API reference UI.
FieldTypeDefaultDescription
enabledbooleantrueEnables frontend serving. Set to false for API-only deployments.
mode'proxy' | 'static''static'proxy forwards non-API requests to an upstream URL. static serves built files from disk.
pathstringruntime defaultOptional in standalone config. Standalone applies a runtime default based on the selected mode.
html_variablesRecord<string, string>{}Standalone-only HTML template variables used to replace {{KEY}} placeholders in served HTML.