Electron Gumroad License
This library allows you to verify and store a user's license for your Electron
app with Gumroad's API.
A valid license is automatically stored in a local file that's encrypted with a
key unique to the user's computer. While this doesn't prevent cracking a
license, it makes it more difficult to copy a license file to another computer.
Getting Started
To use this library, create a new licenseManager
with the ID of your Gumroad
product. You can then use it to check the current license, validate a new one,
and more:
import { createLicenseManager } from "electron-gumroad-license";
const licenseManager = createLicenseManager("product-id");
await licenseManager.addLicense("license-key");
await licenseManager.checkCurrentLicense();
Options
In addition to the product ID, you can pass an option object to the
licenseManager. The following values can be set:
const options = {
maxUses: number;
maxDaysBetweenChecks: number;
gumroadApiUrl: string;
disableEncryption: boolean;
}
Contributing
This package is still in its early stages. Please feel free to contribute by
opening issues and submitting PRs if you feel that something could be done
better.