Apps
An app represents the software you’re protecting. Each app has:- App ID — A UUID that identifies your app. Public (embedded in your binary).
- App Secret — A UUID used to verify server response signatures. Keep this secret. Rotatable via the dashboard.
- Settings — Configuration for your app (variables, security rules, webhooks).
License Keys
License keys are alphanumeric strings in the formatXXXX-XXXX-XXXX-XXXX (using A–Z excluding I and O, digits 2–9). Each key is bound to a single app.
A license has the following properties:
| Field | Description |
|---|---|
licenseKey | The key string itself |
appId | The app this license belongs to |
status | active or revoked |
expiresAt | ISO 8601 expiration date, or null for lifetime licenses |
maxHwidSlots | How many devices can use this key simultaneously (1–10) |
hwidList | Array of bound hardware IDs |
label | Optional label for your records (e.g., order ID) |
createdAt | When the license was created |
HWID (Hardware ID)
A hardware fingerprint of the user’s machine. The SDK collects three identifiers — CPU, MAC address, and disk serial — and computes a SHA-256 hash:hwid_mismatch.
HWID Slots
The number of machines a single license key can be active on simultaneously. When a user authenticates from a new device:- If there’s an open slot, the HWID is bound automatically.
- If all slots are full, authentication fails.
reset-hwid action).
Credits
Credits are the unit of billing in AuthForge. Every billable operation deducts credits from your account.| Operation | Cost |
|---|---|
| Successful license validation | 1 credit |
| 100 successful heartbeats | 1 credit |
| Tier | Credits | Price |
|---|---|---|
| 10k | 10,000 | $10 |
| 30k | 30,000 | $15 |
| 100k | 100,000 | $30 |
| 500k | 500,000 | $100 |
| 1M | 1,000,000 | $150 |
Heartbeats
After a successful login, the SDK runs periodic background checks to verify the license is still valid. The default interval is 15 minutes. If a heartbeat detects the license has been revoked, expired, or the session is invalid, the SDK triggers youronFailure callback (or terminates the process if no callback is set).
Heartbeat Modes
- SERVER mode
- LOCAL mode
On each interval, the SDK sends
POST /auth/heartbeat with a fresh nonce and the session token. The server verifies the session, checks the license status, and returns a signed response.Pros: Catches revocations immediately on the next heartbeat. Real-time enforcement.Cons: Requires network connectivity. Each heartbeat counts toward the 100-per-credit billing threshold.Use when: You need instant revocation enforcement, your users are always online, or you’re protecting high-value software.Developer API
A server-to-server REST API for automating license management from your own backend. Authenticated with API keys (prefixedaf_live_).
Use the Developer API to:
- Create licenses programmatically (e.g., after a Stripe payment)
- Revoke, activate, extend, or reset HWID on licenses
- List and query licenses
- Manage app variables, webhooks, and security settings
App Variables
Key-value pairs set per app, delivered to every SDK client during authentication in theappVariables field of the signed payload.
Use cases:
- Feature flags —
"maintenanceMode": true - Remote config —
"maxUploadSizeMb": 50 - Messages —
"motd": "v2.0 releasing Friday!" - Version gating —
"minVersion": "1.5.0"
License Variables
Key-value pairs set per license, delivered only to that specific license holder during authentication in thelicenseVariables field.
Use cases:
- Plan tiers —
"plan": "pro" - Per-user limits —
"maxProjects": 10 - Custom metadata —
"customerName": "Acme Corp"
Webhooks
Real-time HTTP notifications sent to your server when license events occur. Each delivery is HMAC-SHA256 signed with your webhook secret for verification. Supported events:| Event | Trigger |
|---|---|
license.validated | Successful authentication via SDK |
license.created | License key generated |
license.revoked | License revoked |
license.activated | Revoked license re-activated |
license.hwid_bound | HWID bound to a license slot |
license.hwid_reset | HWID bindings cleared |
license.deleted | License permanently deleted |
Blacklists & Whitelists
Per-app access control lists for HWIDs and IP addresses:- HWID blacklist — Block specific hardware IDs from authenticating.
- HWID whitelist — When set, only listed HWIDs can authenticate (allowlist mode).
- IP blacklist / whitelist — Same concept for IP addresses.