WaffleAuth Documentation
Getting Started
WaffleAuth is a license authentication system that provides functionality for generating and validating license keys.
WaffleAuth.dll
Library File
WaffleHWID.exe
HWID Generator
Important: Before using WaffleAuth, you need to configure your own Firebase/Firestore credentials and endpoints.
Initial Setup
Initialize WaffleAuth with the following configuration methods:
Required Configuration Methods
WaffleAuthFuncs.SetURL("YOUR_FIRESTORE_URL");
WaffleAuthFuncs.SetAPIKey("YOUR_API_KEY");
WaffleAuthFuncs.SetEndPoint("YOUR_ENDPOINT_URL");
WaffleAuthFuncs.SetDuration(1);
WaffleAuthFuncs.SetInitials("LA");
WaffleAuthFuncs.MessageBoxes(true);
| Method |
Description |
Parameter Type |
SetURL() |
Sets the Firestore database URL |
string |
SetAPIKey() |
Sets the API key for authentication |
string |
SetEndPoint() |
Sets the endpoint URL for queries |
string |
SetDuration() |
Sets the duration value in hours |
int |
SetInitials() |
Sets the initials for key generation |
string |
MessageBoxes() |
Enables/disables message boxes |
bool |
Firebase Configuration
Step 1: Create Firebase Project
1. Go to the Firebase Console and create a new project
2. In the project settings, create a new Web App to get your API key and project configuration
3. Enable Firestore Database from the Firebase Console
Step 2: Get Required URLs and Keys
After creating your Firebase project and enabling Firestore, you'll need:
- Firestore URL Format:
https://firestore.googleapis.com/v1/projects/YOUR_PROJECT_ID/databases/(default)/documents/licenses
- Web API Key: Found in your Firebase project settings under the Web App configuration
- Endpoint URL Format:
https://firestore.googleapis.com/v1/projects/YOUR_PROJECT_ID/databases/(default)/documents:runQuery?key=
License Key Format & Premium Keys
Standard Key Format
Each license key in the Firestore database follows this structure:
{
"createdAt": "December 20, 2024 at 4:42:23 PM UTC+1",
"expiresAt": "December 20, 2024 at 5:42:23 PM UTC+1",
"hwid": "751466F8F0542C9A",
"key": "LA-48a7ebadbda84b67"
}
Creating Premium Keys
To create premium keys with custom durations or properties:
- Have the user download and run WaffleHWID.exe to generate their HWID
- Get the HWID from the user that was generated by WaffleHWID.exe
- Go to your Firestore database console
- Manually add a new document to the 'licenses' collection
- Set up the document with the format shown above
- Use the HWID provided by the user in the 'hwid' field of the document
Note: When creating premium keys, ensure you maintain the exact document structure. Premium keys require the user's HWID which can only be generated using WaffleHWID.exe to maintain security and prevent key sharing.
Key Functions
Generate License Key
To generate a new license key:
string generatedKey = await WaffleAuthFuncs.GenerateKeyAsync();
Validate License Key
To check if a license key is valid:
bool isKeyValid = await WaffleAuthFuncs.CheckKey(keyString);
Example Implementation
using WaffleAuth;
public partial class Form1 : Form
{
public Form1()
{
WaffleAuthFuncs.SetURL("YOUR_FIRESTORE_URL");
WaffleAuthFuncs.SetAPIKey("YOUR_API_KEY");
WaffleAuthFuncs.SetEndPoint("YOUR_ENDPOINT_URL");
WaffleAuthFuncs.SetDuration(1);
WaffleAuthFuncs.SetInitials("LA");
WaffleAuthFuncs.MessageBoxes(true);
InitializeComponent();
}
private async void GenerateKey_Click(object sender, EventArgs e)
{
string generatedKey = await WaffleAuthFuncs.GenerateKeyAsync();
}
private async void ValidateKey_Click(object sender, EventArgs e)
{
bool isKeyValid = await WaffleAuthFuncs.CheckKey(licenseKey);
if (!isKeyValid)
{
Application.Exit();
}
}
}
Security Note
Always keep your API keys and credentials secure and never expose them in client-side code or public repositories.