{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/run402-com/json-schema/run402-com-auth-settings-response-schema.json",
  "title": "AuthSettingsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/run402-com-auth-api-openapi.yml#/components/schemas/AuthSettingsResponse",
  "type": "object",
  "required": [
    "allow_password_set",
    "preferred_sign_in_method",
    "public_signup",
    "require_passkey_for_project_admin",
    "test_mode"
  ],
  "properties": {
    "allow_password_set": {
      "type": "boolean",
      "description": "Allow passwordless users to set a password."
    },
    "preferred_sign_in_method": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "password",
        "magic_link",
        "oauth_google",
        "passkey",
        null
      ],
      "description": "Project UI hint for the preferred first sign-in method."
    },
    "public_signup": {
      "type": "string",
      "enum": [
        "open",
        "known_email",
        "invite_only"
      ],
      "description": "Password and untrusted magic-link auto-signup policy."
    },
    "require_passkey_for_project_admin": {
      "type": "boolean",
      "description": "When true, project_admin sessions require an eligible passkey login."
    },
    "test_mode": {
      "$ref": "#/$defs/TestModeStatus"
    }
  },
  "$defs": {
    "TestModeStatus": {
      "type": "object",
      "required": [
        "value",
        "effective",
        "source",
        "default_for_tier"
      ],
      "properties": {
        "value": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Stored project override. null means use the tier default."
        },
        "effective": {
          "type": "boolean",
          "description": "Whether test sessions are currently enabled."
        },
        "source": {
          "type": "string",
          "enum": [
            "explicit",
            "tier_default"
          ]
        },
        "default_for_tier": {
          "type": "boolean",
          "description": "Tier default before the project override is applied."
        }
      }
    }
  }
}