Drop-in client libraries for C# and C++. Handles login, HWID binding, AES encryption, and session validation against the ErenXiters API.
Pass the base URL of your Netlify deployment and your secret API token.
ErenAuthV2.Initialize(
"https://ercore.cc/.netlify/functions",
"your-api-token"
);
ErenAuth::Initialize(
"https://ercore.cc/.netlify/functions",
"your-api-token"
);
Sends the user's HWID (SHA256 of Windows SID). Returns a JWT session token valid for 60 seconds. HWID is auto-bound if empty.
var result = await ErenAuthV2.Login("username", "password"); if (result["_error"] != null) { int code = result["code"]?.ToObject<int>() ?? 0; // Handle error: 10010 = invalid credentials, 10012 = HWID mismatch } // Session token stored internally string loginMessage = ErenAuthV2.CurrentUser["loginMessage"]?.ToString();
std::string resp = ErenAuth::Login("username", "password"); std::string token = ErenAuth::JsonGet(resp, "token"); if (token.empty()) { std::string errCode = ErenAuth::JsonGet(resp, "code"); // Handle error } // Token auto-stored via g_SessionToken
Called on subsequent launches. Encrypts the HWID with AES-256-CBC and sends to the autologin endpoint. Returns username, password, loginMessage if HWID matches.
var data = await ErenAuthV2.AutoLogin(); if (data["error"] != null) { // No matching HWID found, show login form return; } string user = data["username"]?.ToString(); string pass = data["password"]?.ToString(); string msg = data["loginMessage"]?.ToString(); // Auto-fill and call Login() await ErenAuthV2.Login(user, pass);
std::string decrypted = ErenAuth::AutoLogin(); std::string user = ErenAuth::JsonGet(decrypted, "username"); std::string pass = ErenAuth::JsonGet(decrypted, "password"); std::string msg = ErenAuth::JsonGet(decrypted, "loginMessage"); if (!user.empty() && !pass.empty()) ErenAuth::Login(user, pass); // Auto-login
Encrypts the username, sends to the data endpoint. Response is AES-encrypted and must be decrypted. Returns password, expiryDate, hwid, loginMessage, and more.
var data = await ErenAuthV2.FetchUser("username"); string category = data["category"]?.ToString(); string expiry = data["expiryDate"]?.ToString(); string hwid = data["hwid"]?.ToString(); string pay = data["payRemaining"]?.ToString();
std::string decrypted = ErenAuth::FetchUser("username"); std::string cat = ErenAuth::JsonGet(decrypted, "category"); std::string expiry = ErenAuth::JsonGet(decrypted, "expiryDate"); std::string hwid = ErenAuth::JsonGet(decrypted, "hwid");
Call on a timer to ensure the session is still valid. Sends the JWT as Bearer token + HWID in x-hwid header.
bool valid = await ErenAuthV2.ValidateSession(); if (!valid) { ErenAuthV2.Logout(); // Force re-login }
if (!ErenAuth::ValidateSession()) { ErenAuth::Logout(); // Force re-login }
License keys unlock accounts automatically. Admins generate keys in the panel, customers (or admin apps) activate them — the account inherits the license's access level and expiry. All validation is server-side.
Admin panel → Licensing → Licenses. Pick access level, category and validity days, then generate (single or bulk). Keys look like ercore_license_…
Customer submits key + username + password on the public /license-activater page, or an admin app calls POST /api/activate with its own token.
New account lands in the license's category and inherits its access level + expiry date. Pay status = Paid.
Status becomes used, activation time and linked username are recorded. Keys are one-time — and admins only ever see the keys they created themselves.
{ "license_key": "ercore_license_...",
"username": "customer_name",
"password": "customer_pass" }
{ "success": true,
"message": "Account activated",
"account": { "username": "customer_name",
"category": "EREN",
"accessLevel": "VIP",
"expiryDate": "2026-09-10 12:00:00",
"payStatus": "Paid" } }
POST /api/activate Authorization: Bearer <admin token> Content-Type: application/json { "license_key": "ercore_license_...", "username": "customer_name", "password": "customer_pass" }
curl -X POST https://ercore.cc/api/activate \ -H "Authorization: Bearer <admin token>" \ -H "Content-Type: application/json" \ -d '{"license_key":"ercore_license_...","username":"customer_name","password":"customer_pass"}'