{
  "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"
            },
            "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": {
              "properties": {
                "email": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                },
                "requestSent": {
                  "additionalProperties": false,
                  "properties": {
                    "email": {
                      "type": "string"
                    },
                    "password": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "email",
                    "password"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "email",
                "password",
                "requestSent"
              ],
              "type": "object"
            }
          },
          "required": [
            "login",
            "register",
            "recoverOrActivate",
            "recoverPassword",
            "oauthFlowInit",
            "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": "Authentication component",
  "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"
    },
    "oauthFlowInit": {
      "action": "oauthFlowInit"
    },
    "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": "--bs-primary",
        "valueType": "color",
        "theme": "bootstrap",
        "defaultValue": "#07689f"
      },
      {
        "name": "--bs-secondary",
        "valueType": "color",
        "theme": "bootstrap",
        "defaultValue": "#c9d6df"
      },
      {
        "name": "--bs-success",
        "valueType": "color",
        "theme": "bootstrap",
        "defaultValue": "#11d3bc"
      },
      {
        "name": "--bs-info",
        "valueType": "color",
        "theme": "bootstrap",
        "defaultValue": "#a2d5f2"
      },
      {
        "name": "--bs-warning",
        "valueType": "color",
        "theme": "bootstrap",
        "defaultValue": "#ffc107"
      },
      {
        "name": "--bs-danger",
        "valueType": "color",
        "theme": "bootstrap",
        "defaultValue": "#f67280"
      }
    ],
    "parts": []
  },
  "contributors": [],
  "htmlSlots": [
    {
      "name": "header",
      "description": ""
    }
  ],
  "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"
      }
    }
  ],
  "screenshots": [],
  "licenses": [
    {
      "type": "Apache-2.0",
      "path": "LICENSE.md",
      "cost": 0,
      "currency": "EUR"
    }
  ],
  "readmePath": "README.md",
  "name": "hb-auth",
  "category": "components",
  "tags": [
    "components"
  ],
  "size": {
    "layout": "fullscreen"
  },
  "iifePath": "main.iife.js",
  "repoName": "@htmlbricks/hb-auth",
  "version": "0.65.16"
}