Schema Format

Learn about the JSON schema format used to define authentication forms.

Basic Structure

Every form schema follows a consistent structure with the following top-level properties:

{
  "type": "login" | "signup" | "reset-password",
  "title": "Optional form title",
  "description": "Optional form description",
  "fields": [...],
  "submit": "Submit button text",
  "footer": {...}
}

Field Definition

Each field in the fields array defines an input with the following properties:

{
  "name": "fieldName",
  "type": "text" | "email" | "password" | "tel" | "url",
  "label": "Field Label",
  "placeholder": "Optional placeholder",
  "required": true | false,
  "validation": {
    "minLength": 8,
    "maxLength": 100,
    "pattern": "regex pattern"
  }
}

Footer Configuration

Add links or additional text below the form:

{
  "footer": {
    "text": "Don't have an account?",
    "link": {
      "text": "Sign up",
      "href": "/signup"
    }
  }
}