{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/run402-com/json-schema/run402-com-auth-providers-response-schema.json",
  "title": "AuthProvidersResponse",
  "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/AuthProvidersResponse",
  "type": "object",
  "properties": {
    "password": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "delivery_modes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "link",
              "code",
              "both"
            ]
          },
          "description": "Supported email credential modes. Absent on older deployments means link-only."
        }
      }
    },
    "magic_link": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        }
      }
    },
    "password_set": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        }
      }
    },
    "passkey": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "resident_key": {
          "type": "string",
          "enum": [
            "preferred"
          ]
        },
        "user_verification": {
          "type": "string",
          "enum": [
            "required"
          ]
        }
      }
    },
    "settings": {
      "$ref": "#/$defs/AuthSettingsResponse"
    },
    "oauth": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "display_name": {
            "type": "string"
          }
        }
      }
    }
  },
  "$defs": {
    "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"
        }
      }
    },
    "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."
        }
      }
    }
  }
}