Getting Started
Create a project, copy its project key, then choose whether your app signs in with username/password or license keys.
Project Key
Every SDK initialization requires the project key shown at the top of the project page. This securely identifies your application to the identity servers.
PROJECT_KEY="slk_prod_xxxxxxxxxxxx"
Username / Password Login
Traditional authentication flow. Use this when you manually provision users via the dashboard or automate signups via the Admin API.
using SkullLabs.Identity;
var auth = new AuthClient("slk_prod_xxxxxxxxxxxx");
var session = await auth.LoginAsync("alice", "hunter2");
if (!session.IsSuccess) {
Console.WriteLine($"[ERR] {session.Error}");
return;
}
Console.WriteLine($"Welcome, {session.User?.Username}");
Console.WriteLine(
session.User?.ExpiresAtUtc is DateTime expiry
? $"Valid until: {expiry.ToLocalTime():dd MMM yyyy}"
: "Valid until: Lifetime"
);License-Only Authentication
Anonymous, key-based authentication. Ideal for software distribution where users purchase a key and immediately gain access without creating an account.
using SkullLabs.Identity;
var auth = new AuthClient("slk_prod_xxxxxxxxxxxx");
var session = await auth.LoginWithLicenseAsync("SKL-XXXX-XXXX");
if (!session.IsSuccess) {
Console.WriteLine($"[ERR] {session.Error}");
return;
}
Console.WriteLine(
session.License?.ExpiresAt is long expiry
? $"License expires: {DateTimeOffset.FromUnixTimeMilliseconds(expiry).LocalDateTime}"
: "License is Lifetime"
);Hardware Locking (HWID)
When HWID locking is enabled for a user or a key, the SDK automatically collects a secure hash of the hardware environment during the first successful login. All subsequent logins must originate from the same hardware.
Note: HWID resets can be performed manually via the Command Center if a user upgrades their machine.
Status Controls
Identities can be marked as Active, Paused, or Banned. The SDK automatically validates status on every request and returns the corresponding error payload to your client.
Native SDKs
Download zero-dependency client libraries for your platform. Drop them into your project to get started immediately.
Username + Password SDK Files
SDK files and examples for normal username/password login.
License SDK Files
SDK files and examples for license-only login.