Protect your App Secret
The App Secret is the most sensitive value in your integration. It’s used to verify server response signatures — if an attacker obtains it, they can forge signed payloads locally.Never hardcode in plain text
Don’t embed the secret as a string literal in your source code. Use environment variables, encrypted config files, or a secrets manager.
Never log the secret
Ensure your logging framework doesn’t accidentally capture it. Redact secrets from error reports and crash dumps.
Rotate if compromised
If you suspect the secret has been leaked, rotate it immediately in the dashboard (App Settings → Rotate Secret). All running clients will fail on the next heartbeat, prompting a restart with the new secret.
Authenticate early
Calllogin() as early as possible in your application’s startup. Don’t let the app run meaningful code paths before authentication succeeds.
Minimize error details
Don’t expose internal error information to the user. Detailed error messages help attackers understand your verification logic.Use SERVER heartbeat mode for high-value software
LOCAL heartbeat mode can be bypassed by:- Freezing or rolling back the system clock
- Patching the SDK to skip the local signature check
Don’t trust the client
Your binary can be decompiled, patched, and modified. Design with this assumption:- Don’t gate features with a simple boolean. Instead of
if (licensed) { runProFeature() }, read license variables and check specific capabilities. - Don’t store the license status in a predictable location. Avoid a single
isLicensed = truefield that can be patched. - Spread auth checks. Don’t check the license in a single function — verify state at multiple points in your application.
Obfuscation (defense in depth)
While not a substitute for proper license verification, code obfuscation raises the difficulty of cracking:| Language | Tools |
|---|---|
| Python | PyArmor, Cython compilation, Nuitka |
| C# | ConfuserEx, .NET Reactor, Eazfuscator |
| C++ | LLVM obfuscation passes, Themida, VMProtect |
Network security
- Always use HTTPS. The SDK communicates with
https://auth.authforge.ccby default. Never override the base URL to use HTTP. - Pin the certificate if your platform supports it, to prevent MITM with a trusted CA compromise.
- Validate the nonce. The SDK does this automatically — the nonce in the response must match the one you sent. This prevents replay attacks.
HWID and IP security
Use blacklists and whitelists to control access:- Blacklist known-bad HWIDs — If you discover a cracked copy, blacklist the HWID to prevent re-authentication.
- Use IP whitelists for enterprise — Restrict authentication to known office IP ranges.
- Monitor for anomalies — If a license key is being validated from many different HWIDs (more than the slot count allows, via resets), investigate abuse.
API key security
For your Developer API keys:- Don’t expose API keys in client-side code. API calls should only be made from your server.
- Use separate keys for different environments (development, staging, production).
- Audit key usage — If a key is compromised, delete it and create a new one. Keys are scoped to your account, so a compromised key gives access to all your apps’ license management.
Webhook security
- Always verify the signature on incoming webhook requests using the
X-AuthForge-Signatureheader. - Use HTTPS for your webhook endpoint.
- Don’t expose your webhook secret in client code or logs.
- Validate the event type — only process events you expect.
Incident response
If you discover a cracked version of your software:- Identify the HWID from your auth logs (if available via webhooks or the dashboard).
- Blacklist the HWID to block future authentication from that machine.
- Rotate your App Secret if you suspect it was extracted from the binary.
- Update your binary with stronger obfuscation and push an update.
- Review your integration against this checklist.