{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/feedback1-ai/json-schema/feedback1-ai-product-auth-settings-schema.json",
  "title": "ProductAuthSettings",
  "description": "Per-product authentication configuration for userportal.\n\nOAuth providers (Google, Microsoft) are enabled by default using Feedback1's\nglobal credentials. Custom OAuth credentials per tenant is an enterprise feature.",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/feedback1-ai-openapi.json#/components/schemas/ProductAuthSettings",
  "properties": {
    "sso_enabled": {
      "type": "boolean",
      "title": "Sso Enabled",
      "description": "Enable JWT-based SSO authentication",
      "default": true
    },
    "saml_enabled": {
      "type": "boolean",
      "title": "Saml Enabled",
      "description": "SAML SSO available for this product",
      "default": false
    },
    "saml_provider_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Saml Provider Name",
      "description": "Name of the SAML IdP if enabled"
    },
    "saml_login_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Saml Login Url",
      "description": "URL to initiate SAML login"
    },
    "email_auth_enabled": {
      "type": "boolean",
      "title": "Email Auth Enabled",
      "description": "Enable email/password authentication",
      "default": true
    },
    "allow_signup": {
      "type": "boolean",
      "title": "Allow Signup",
      "description": "Allow new user registration",
      "default": true
    },
    "require_email_verification": {
      "type": "boolean",
      "title": "Require Email Verification",
      "description": "Require email verification for new signups",
      "default": false
    },
    "google_oauth_enabled": {
      "type": "boolean",
      "title": "Google Oauth Enabled",
      "description": "Enable Google OAuth sign-in (uses Feedback1 credentials by default)",
      "default": true
    },
    "microsoft_oauth_enabled": {
      "type": "boolean",
      "title": "Microsoft Oauth Enabled",
      "description": "Enable Microsoft OAuth sign-in (uses Feedback1 credentials by default)",
      "default": true
    },
    "require_auth_to_vote": {
      "type": "boolean",
      "title": "Require Auth To Vote",
      "description": "Require authentication to vote on features",
      "default": false
    },
    "require_auth_to_comment": {
      "type": "boolean",
      "title": "Require Auth To Comment",
      "description": "Require authentication to comment on features",
      "default": true
    },
    "widget_opener_hosts": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Widget Opener Hosts",
      "description": "Hosts allowed as the widget-auth postMessage target"
    }
  },
  "type": "object"
}