{
  "definitions": {
    "events": {
      "$ref": "#/definitions/Events",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {
        "Events": {
          "additionalProperties": false,
          "properties": {
            "login": {
              "additionalProperties": false,
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                },
                "rememberMe": {
                  "type": "boolean"
                },
                "token": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "oauthFlowCustom": {
              "additionalProperties": false,
              "properties": {
                "provider": {
                  "$ref": "#/definitions/IProvider"
                }
              },
              "required": [
                "provider"
              ],
              "type": "object"
            },
            "oauthFlowInit": {
              "additionalProperties": false,
              "properties": {
                "provider": {
                  "$ref": "#/definitions/IProvider"
                },
                "redirect_uri": {
                  "type": "string"
                },
                "tmpCode": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                }
              },
              "required": [
                "provider"
              ],
              "type": "object"
            },
            "oauthFlowRedirectStart": {
              "additionalProperties": false,
              "properties": {
                "provider": {
                  "$ref": "#/definitions/IProvider"
                }
              },
              "required": [
                "provider"
              ],
              "type": "object"
            },
            "oauthFlowSuccess": {
              "additionalProperties": false,
              "properties": {
                "token": {
                  "type": "string"
                }
              },
              "required": [
                "token"
              ],
              "type": "object"
            },
            "recoverOrActivate": {
              "additionalProperties": false,
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                },
                "recoverycode": {
                  "type": "string"
                }
              },
              "required": [
                "password",
                "recoverycode",
                "email"
              ],
              "type": "object"
            },
            "recoverPassword": {
              "additionalProperties": false,
              "properties": {
                "email": {
                  "type": "string"
                }
              },
              "required": [
                "email"
              ],
              "type": "object"
            },
            "register": {
              "description": "Server JSON when `registeruri` succeeds (arbitrary fields + optional `requestSent`), or `{ email, password }` when no URI is configured.",
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                },
                "requestSent": {
                  "additionalProperties": false,
                  "properties": {
                    "email": {
                      "type": "string"
                    },
                    "password": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "email",
                    "password"
                  ],
                  "type": "object"
                }
              },
              "type": "object"
            }
          },
          "required": [
            "login",
            "register",
            "recoverOrActivate",
            "recoverPassword",
            "oauthFlowInit",
            "oauthFlowRedirectStart",
            "oauthFlowSuccess",
            "oauthFlowCustom"
          ],
          "type": "object"
        },
        "IProvider": {
          "enum": [
            "facebook",
            "google",
            "gitlab",
            "github",
            "authentik"
          ],
          "type": "string"
        }
      }
    },
    "component": {
      "$ref": "#/definitions/Component",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {
        "Component": {
          "additionalProperties": false,
          "properties": {
            "activateuri": {
              "type": "string"
            },
            "appendbodyparams": {
              "type": "string"
            },
            "appendqueryparams": {
              "type": "string"
            },
            "disablelocal": {
              "type": "boolean"
            },
            "disableregister": {
              "type": "boolean"
            },
            "email": {
              "type": "string"
            },
            "enable_recover_password": {
              "type": "boolean"
            },
            "i18nlang": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "loginuri": {
              "type": "string"
            },
            "logouri": {
              "type": "string"
            },
            "oauth2providers": {
              "items": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "$ref": "#/definitions/IProvider"
                      },
                      "params": {
                        "additionalProperties": false,
                        "properties": {
                          "auth_server_url": {
                            "type": "string"
                          },
                          "client_id": {
                            "type": "string"
                          },
                          "redirect_url": {
                            "type": "string"
                          },
                          "scope": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "redirect_url",
                          "client_id",
                          "scope"
                        ],
                        "type": "object"
                      },
                      "url": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  {
                    "not": {}
                  }
                ]
              },
              "type": "array"
            },
            "passwordpattern": {
              "type": "string"
            },
            "recoveruri": {
              "type": "string"
            },
            "recoverycode": {
              "type": "string"
            },
            "redirectoncreate": {
              "type": "string"
            },
            "redirectonlogin": {
              "type": "string"
            },
            "registeruri": {
              "type": "string"
            },
            "requestmethod": {
              "type": "string"
            },
            "sessionkey": {
              "type": "string"
            },
            "social_auth_server_url": {
              "type": "string"
            },
            "style": {
              "type": "string"
            },
            "type": {
              "enum": [
                "login",
                "register",
                "activate",
                "recover",
                "forgotpassword",
                "mailrecoverinfo",
                "otp",
                "2fa_code",
                "2fa_config"
              ],
              "type": "string"
            }
          },
          "type": "object"
        },
        "IProvider": {
          "enum": [
            "facebook",
            "google",
            "gitlab",
            "github",
            "authentik"
          ],
          "type": "string"
        }
      }
    }
  },
  "description": "Full authentication UI driven by the `type` attribute: local login and registration (with optional “remember me”), email activation, password recovery and related notices, OTP and two-factor setup/verification. Supports OAuth2 social providers via embedded social-login buttons, configurable backend URIs and HTTP options, optional i18n, and dispatches events for login, registration, recovery/activation, and OAuth flow steps. Social login shows a full-card overlay with a CSS-only spinner while redirecting or exchanging the callback, then a success notification after the session token is stored.",
  "storybookArgs": {
    "type": {
      "options": [
        "login",
        "register",
        "activate",
        "recover",
        "mailrecoverinfo",
        "forgotpassword",
        "otp",
        "2fa_code",
        "2fa_config"
      ],
      "control": {
        "type": "select"
      }
    },
    "enable_recover_password": {
      "control": {
        "type": "boolean"
      }
    },
    "i18nlang": {
      "control": {
        "type": "text"
      }
    },
    "disableregister": {
      "control": {
        "type": "boolean"
      }
    },
    "disablelocal": {
      "control": {
        "type": "boolean"
      }
    },
    "logouri": {
      "control": {
        "type": "text"
      }
    },
    "loginuri": {
      "control": {
        "type": "text"
      }
    },
    "registeruri": {
      "control": {
        "type": "text"
      }
    },
    "login": {
      "action": "loginEvent"
    },
    "register": {
      "action": "registerEvent"
    },
    "recoverOrActivate": {
      "action": "recoverOrActivateEvent"
    },
    "recoverPassword": {
      "action": "recoverPasswordEvent"
    },
    "oauthFlowInit": {
      "action": "oauthFlowInit"
    },
    "oauthFlowRedirectStart": {
      "action": "oauthFlowRedirectStart"
    },
    "oauthFlowSuccess": {
      "action": "oauthFlowSuccess"
    },
    "oauthFlowCustom": {
      "action": "oauthFlowCustomEvent"
    },
    "oauth2providers": {
      "control": {
        "type": "array"
      }
    },
    "sessionkey": {
      "control": {
        "type": "text"
      }
    },
    "redirectonlogin": {
      "control": {
        "type": "text"
      }
    },
    "redirectoncreate": {
      "control": {
        "type": "text"
      }
    },
    "activateuri": {
      "control": {
        "type": "text"
      }
    },
    "recoveruri": {
      "control": {
        "type": "text"
      }
    },
    "requestmethod": {
      "control": {
        "type": "text"
      }
    },
    "appendqueryparams": {
      "control": {
        "type": "text"
      }
    },
    "appendbodyparams": {
      "control": {
        "type": "text"
      }
    },
    "passwordpattern": {
      "control": {
        "type": "text"
      }
    },
    "recoverycode": {
      "control": {
        "type": "text"
      }
    },
    "email": {
      "control": {
        "type": "text"
      }
    }
  },
  "styleSetup": {
    "vars": [
      {
        "name": "--bulma-scheme-main",
        "valueType": "color",
        "defaultValue": "(theme)",
        "description": "Surface color for the Bulma `box` shell. Set on `body` / `:root` or override on `hb-auth` to theme the shadow tree; follows light/dark Bulma tokens by default."
      },
      {
        "name": "--bulma-box-background-color",
        "valueType": "color",
        "defaultValue": "(theme)",
        "description": "OAuth loading overlay fill; matches the Bulma `box` surface when the theme registers this token."
      },
      {
        "name": "--bulma-box-radius",
        "valueType": "number",
        "defaultValue": "(theme)",
        "description": "OAuth loading overlay corner radius; matches the Bulma `box` when the theme registers this token."
      },
      {
        "name": "--bulma-scheme-main-ter",
        "valueType": "color",
        "defaultValue": "(theme)",
        "description": "Background for embedded `hb-auth-social-login-button` tiles inside the OAuth grid."
      },
      {
        "name": "--bulma-border-weak",
        "valueType": "color",
        "defaultValue": "(theme)",
        "description": "Border for the card shell, OAuth tiles, and horizontal divider; contrasts in both schemes."
      },
      {
        "name": "--bulma-radius",
        "valueType": "number",
        "defaultValue": "(theme)",
        "description": "Corner radius for social tiles and related controls; OAuth loading layer uses `--bulma-box-radius` when available."
      },
      {
        "name": "--bulma-shadow",
        "valueType": "other",
        "defaultValue": "(theme)",
        "description": "Bulma `box` shadow on the auth card."
      },
      {
        "name": "--bulma-text",
        "valueType": "color",
        "defaultValue": "(theme)",
        "description": "Default text on `:host`; aligns with the active Bulma scheme."
      },
      {
        "name": "--bulma-text-strong",
        "valueType": "color",
        "defaultValue": "(theme)",
        "description": "Strong heading text (e.g. card titles)."
      },
      {
        "name": "--bulma-link",
        "valueType": "color",
        "defaultValue": "(theme)",
        "description": "Ghost links, OAuth tile hover ring, `:focus-visible` outlines, and OAuth loading spinner accent; matches Bulma link token."
      }
    ],
    "parts": []
  },
  "contributors": [],
  "htmlSlots": [
    {
      "name": "header",
      "description": "Optional branding above the form (logo area and title); replaces the default header block when provided."
    }
  ],
  "i18n": [
    {
      "lang": "it",
      "language": "italian"
    },
    {
      "lang": "en",
      "language": "english"
    }
  ],
  "examples": [
    {
      "name": "login",
      "data": {
        "type": "login",
        "logouri": "https://upload.wikimedia.org/wikipedia/commons/a/af/Free_Content_Logo.svg"
      }
    },
    {
      "name": "register",
      "data": {
        "type": "register",
        "logouri": "https://upload.wikimedia.org/wikipedia/commons/a/af/Free_Content_Logo.svg"
      }
    },
    {
      "name": "activate",
      "data": {
        "type": "activate",
        "recoverycode": "testcode",
        "logouri": "https://upload.wikimedia.org/wikipedia/commons/a/af/Free_Content_Logo.svg"
      }
    },
    {
      "name": "recover",
      "data": {
        "type": "recover",
        "logouri": "https://upload.wikimedia.org/wikipedia/commons/a/af/Free_Content_Logo.svg"
      }
    },
    {
      "name": "LoginEn",
      "data": {
        "type": "login",
        "i18nlang": "en",
        "disableregister": true
      }
    },
    {
      "name": "LoginItOnly",
      "data": {
        "type": "login",
        "i18nlang": "it",
        "disableregister": true
      }
    },
    {
      "name": "LoginEnWithFetch",
      "data": {
        "type": "login",
        "i18nlang": "en",
        "loginuri": "https://kernel.free.beeceptor.com/login",
        "registeruri": "https://kernel.free.beeceptor.com/register"
      }
    },
    {
      "name": "LoginEnWithOauth",
      "data": {
        "logouri": "https://upload.wikimedia.org/wikipedia/commons/a/af/Free_Content_Logo.svg",
        "type": "login",
        "i18nlang": "en",
        "loginuri": "https://kernel.free.beeceptor.com/login",
        "registeruri": "https://kernel.free.beeceptor.com/register",
        "oauth2providers": [
          {
            "name": "google",
            "url": "https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/drive.metadata.readonly&include_granted_scopes=true&response_type=token&state=state_parameter_passthrough_value&redirect_uri=https%3A//oauth2.example.com/code&client_id=client_id"
          },
          {
            "name": "facebook",
            "url": ""
          },
          {
            "name": "gitlab",
            "url": ""
          },
          {
            "name": "github",
            "url": ""
          }
        ]
      }
    },
    {
      "name": "LoginEnWithOauthOnly",
      "data": {
        "type": "login",
        "logouri": "https://upload.wikimedia.org/wikipedia/commons/a/af/Free_Content_Logo.svg",
        "disablelocal": true,
        "oauth2providers": [
          {
            "name": "google",
            "url": "https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/drive.metadata.readonly&include_granted_scopes=true&response_type=token&state=state_parameter_passthrough_value&redirect_uri=https%3A//oauth2.example.com/code&client_id=client_id"
          },
          {
            "name": "facebook",
            "url": ""
          },
          {
            "name": "gitlab",
            "url": ""
          },
          {
            "name": "github",
            "url": ""
          }
        ]
      }
    },
    {
      "name": "forgotpassword",
      "data": {
        "enable_recover_password": true,
        "type": "forgotpassword",
        "logouri": "https://upload.wikimedia.org/wikipedia/commons/a/af/Free_Content_Logo.svg"
      }
    },
    {
      "name": "mailrecoverinfo",
      "data": {
        "type": "mailrecoverinfo",
        "logouri": "https://upload.wikimedia.org/wikipedia/commons/a/af/Free_Content_Logo.svg"
      }
    }
  ],
  "iifeIntegrity": "sha384-HhQbkBtcP8IWlaIXA4BqX4WYRtKp5uV2syfe1uqTVr12B4AegVYsCZp2DZ47Nncb",
  "dependencies": [
    {
      "name": "hb-auth-social-login-button",
      "dependencies": []
    }
  ],
  "screenshots": [],
  "licenses": [
    {
      "type": "Apache-2.0",
      "path": "LICENSE.md",
      "cost": 0,
      "currency": "EUR"
    }
  ],
  "readmePath": "README.md",
  "name": "hb-auth",
  "category": "auth",
  "tags": [
    "auth"
  ],
  "size": {
    "layout": "fullscreen"
  },
  "iifePath": "main.iife.js",
  "repoName": "@htmlbricks/hb-auth",
  "version": "0.71.37"
}