A authforge
self-hosted auth infrastructure

Licensing that lives
inside your binary.

Issue keys, bind hardware, expire subscriptions and kill sessions — all through one small JSON API. No SDKs to fight, no dashboard latency, no mystery.

6core endpoints
scryptpassword hashing
sqlitedurable storage
100%std-lib backend
client.cpp
// authenticate a session from your client
auto res = api.post("/api/v1/login", {
  {"app_id",     "AF-9E1C2B7A"},
  {"app_secret", "AFSEC-…"},
  {"username",   "nyx"},
  {"password",   password},
  {"hwid",       machine_id()}
});

if (!res["success"]) return fail(res["message"]);
auto token = res["data"]["token"].get<std::string>();

// heartbeat — verify the session is still alive
api.post("/api/v1/verify", {}, token);

The parts that matter

Built for the boring stuff you'd otherwise write yourself — and then forget to secure.

{K}

License keys

Generate in bulk, set duration, level and use limits. Redemption extends expiry from the current end date, not from right now.

{H}

HWID binding

First login seals the hardware id. Subsequent logins must match, unless you flip the override in settings.

{S}

Sessions

Random bearer tokens, hashed at rest, with expiry and last-seen tracking. Revoke any account's sessions with one click.

{A}

Applications

Multiple apps under one roof. Each gets its own id, secret, users, keys and public-registration switch.

{R}

Rate limits

Sliding-window throttling plus a per-IP lockout after repeated failed logins. Configurable from the admin panel.

{L}

Audit log

Registrations, logins, key generation, bans and settings changes are recorded with actor, IP and timestamp.

Small API, predictable shape

Every response is {"success": bool, "message": str, "data": {...}}. Errors carry the same envelope.

Client endpoints

POST/api/v1/initverify app credentials
POST/api/v1/registercreate user with key
POST/api/v1/loginauthenticate + bind hwid
POST/api/v1/verifysession heartbeat
POST/api/v1/redeemapply another key
POST/api/v1/logoutrevoke session

Admin endpoints

GET/admin/api/overviewcounts + recent activity
GET/admin/api/userssearch / filter users
POST/admin/api/licenses/generatebulk key creation
PATCH/admin/api/users/{id}ban, level, expiry, hwid
PATCH/admin/api/settingsruntime configuration
GET/admin/api/logsaudit trail