@huzalabs/licence-widget
v0.1.4
Published
React widget for gating application UI behind Huzalabs license activation and validation.
Downloads
484
Maintainers
Readme
@huzalabs/licence-widget
React UI wrapper for gating application screens behind Huzalabs license activation and validation.
Install
pnpm add @huzalabs/licence-widget @huzalabs/licence-sdk
npm install @huzalabs/licence-widget @huzalabs/licence-sdk
yarn add @huzalabs/licence-widget @huzalabs/licence-sdkUsage
import { LicenceHuzalabs } from "@huzalabs/licence-widget";
<LicenceHuzalabs
productId="inventory-system"
apiUrl="https://licence.example.com"
publicKey="-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
userId="didier"
email="[email protected]"
deviceType="desktop"
requiredFeatures={["dashboard_access"]}
>
<Dashboard />
</LicenceHuzalabs>;Props
productIdapiUrlpublicKeydefaultLicenseKeyrequiredFeaturesstorageKeyuserIdemailplatformIddeviceTypetitlesubtitlefallbackonStateChange
States
no_licenseactivatingactiveexpiredinvalidrevokeddevice_limit_reachedoffline_grace_modefeature_unavailable
Key Notes
publicKeyshould be the real public verification key from your licensing backend.- This widget improves UX, but it should not be your only security boundary. Users control the browser environment.
- Sensitive actions should still be enforced by the backend even if the widget shows an unlocked UI.
- For the best user experience, provide a stable
productId, a reachableapiUrl, and a server-issued signed token path.
