Professional authentication and licensing system for applications and games
Features β’ Installation β’ Documentation β’ Contributing β’ License
SpeXCore KeyAuth is a comprehensive, production-ready authentication and licensing system built with modern web technologies. It provides robust user management, license key generation, HWID locking, webhook notifications, and detailed API logging - perfect for protecting your applications, games, or software products.
- π Secure Authentication - JWT-based auth with HWID binding
- π« License Management - Generate, validate, and track license keys
- π₯ User Management - Complete user lifecycle management
- π Analytics Dashboard - Real-time statistics and insights
- π Webhook System - Event-driven notifications (Discord support)
- π‘οΈ Rate Limiting - Built-in protection against abuse
- π API Logging - Comprehensive request/response tracking
- π¨ Modern UI - Beautiful, responsive interface with glass-morphism design
- β JWT token-based authentication
- β Hardware ID (HWID) binding and verification
- β IP tracking and validation
- β Rate limiting per endpoint
- β Secure password hashing (bcrypt)
- β Session management
- β Ban system with reason tracking
- β HWID reset request system
- β Bulk license key generation
- β Customizable license duration
- β License validation and redemption
- β Usage tracking (who, when, where)
- β License notes and metadata
- β Export licenses to CSV/TXT
- β Application-specific users (App Users)
- β Subscription/expiration management
- β Ban/unban functionality
- β User activity logs
- β Login history tracking
- β Bulk user operations
- β Event-driven notifications
- β Discord webhook support with rich embeds
- β Multiple webhook endpoints per app
- β Event filtering (login, register, ban, license, HWID)
- β HMAC signature verification
- β Webhook testing tool
- β RESTful API v1 endpoints
- β Comprehensive API documentation
- β API key management
- β Request logging with metadata
- β Response time tracking
- β Error tracking
- β Filterable logs (by app, method, status, date)
- β Modern glass-morphism design
- β Responsive layout (mobile-friendly)
- β Real-time statistics
- β Interactive charts
- β Dark mode interface
- β Smooth animations
- Game Protection - Protect your game from unauthorized access
- Software Licensing - Manage software licenses and subscriptions
- Cheat/Mod Distribution - Control access to your modifications
- SaaS Applications - User authentication and subscription management
- Beta Testing - Controlled access with license keys
- Educational Software - Student license management
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Lucide React - Beautiful icons
- Next.js API Routes - Serverless API endpoints
- Prisma ORM - Type-safe database access
- MySQL - Reliable database
- JWT - Secure token authentication
- bcrypt - Password hashing
- crypto - HMAC signature generation
- rate-limiting - Request throttling
- date-fns - Date manipulation
- Node.js >= 18.0.0
- MySQL database
- npm or yarn
- Clone the repository
git clone https://github.com/spexdw/spexcore-keyauth.git
cd spexcore-keyauth/keyauth- Install dependencies
npm install- Configure environment variables
cp .env.example .envEdit .env file:
DATABASE_URL="mysql://user:password@localhost:3306/keyauth"
JWT_SECRET="your-super-secret-jwt-key-change-this"
NEXTAUTH_SECRET="your-nextauth-secret-change-this"
NEXTAUTH_URL="http://localhost:3000"- Setup database
npx prisma generate
npx prisma db push- Run development server
npm run dev- Open application
http://localhost:3000
npm run build
npm startBase URL: https://your-domain.com/api/v1
X-App-ID: your_application_id
X-API-Key: your_api_key
Content-Type: application/jsonAuthentication
POST /api/v1/auth/login- User loginPOST /api/v1/auth/register- User registrationPOST /api/v1/auth/verify- Token verificationPOST /api/v1/auth/logout- User logout
License Management
POST /api/v1/license/validate- Validate license keyPOST /api/v1/license/redeem- Redeem license key
User Profile
GET /api/v1/user/profile- Get user profilePOST /api/v1/user/hwid/reset-request- Request HWID reset
Application Info
GET /api/v1/app/info- Get application detailsGET /api/v1/app/version- Check for updates
Security
POST /api/v1/security/report- Report security event
For detailed API documentation, visit /usercp/docs in the application or visit EXAMPLES/.
// Login Example
const response = await fetch('https://api.example.com/api/v1/auth/login', {
method: 'POST',
headers: {
'X-App-ID': 'your_app_id',
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
username: 'testuser',
password: 'password123',
hwid: 'ABC-123-DEF-456'
})
});
const data = await response.json();
console.log(data.data.token); // JWT tokenWe welcome contributions from the community! Here's how you can help:
-
Report Bugs π
- Check if the issue already exists
- Provide detailed reproduction steps
- Include system information and logs
-
Suggest Features π‘
- Open an issue with the
enhancementlabel - Describe the feature and its benefits
- Provide examples or mockups if possible
- Open an issue with the
-
Submit Pull Requests π§
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow the existing code style
- Write meaningful commit messages
- Add comments for complex logic
- Update documentation if needed
- Test your changes thoroughly
- Ensure all endpoints work correctly
- Use TypeScript for type safety
- Follow React/Next.js best practices
- Use Tailwind CSS for styling
- Keep components modular and reusable
- Add proper error handling
This project is licensed under the MIT License - see the LICENSE file for details.
β You CAN:
- Use commercially
- Modify the code
- Distribute
- Use privately
- Sublicense
β You CANNOT:
- Hold the author liable
- Use the author's name for endorsement
- Include the original license and copyright notice
- Built with β€οΈ by the SpeXCore
- Inspired by KeyAuth and similar authentication systems
- Thanks to all contributors and supporters
Need help? Have questions?
- π¬ Discord: spexd
- π Documentation: Read the docs
- π Issues: GitHub Issues
- API Response Time: < 100ms average
- Rate Limiting: Configurable per endpoint
- Database Queries: Optimized with Prisma
- Bundle Size: Optimized for production
- Uptime: 99.9% SLA
Security is our top priority. If you discover a security vulnerability, please:
- DO NOT open a public issue
- Discord spexd with details
- Allow us time to address the issue
- We'll credit you in our security acknowledgments
Made with β€οΈ by SpeXCore
