lighty-auth
Multi-provider authentication system for Minecraft launchers with OAuth2 and CMS integrations.
Overview
Part of: LightyLauncher
lighty-auth provides a unified trait-based authentication system supporting multiple providers:
- Offline Mode - Local authentication without network, generates deterministic UUIDs
- Microsoft Account - OAuth 2.0 Device Code Flow via Microsoft/Xbox Live/Minecraft Services
- Azuriom CMS - Server authentication with 2FA support, roles, and permissions
- Custom Providers - Implement the
Authenticatortrait for your own auth system
Quick Start
Offline Authentication
use ;
async
Microsoft Authentication
Azure AD setup required — your client ID must also be approved by Mojang before it can call Minecraft Services. Follow the full step-by-step guide with screenshots in docs/application-id-microsoft.md.
use ;
async
Authentication Providers
| Provider | Status | Network | Use Cases |
|---|---|---|---|
| Offline | ✅ Stable | Not required | Testing, offline play, development |
| Microsoft | ✅ Stable | Required | Legitimate Minecraft accounts |
| Azuriom | ✅ Stable | Required | Custom server authentication, launcher whitelisting |
Features
- Trait-based - Implement
Authenticatorfor custom providers - Event integration - Track authentication progress with events
- 2FA support - Azuriom two-factor authentication
- Offline UUIDs - Deterministic UUID generation
- Role system - User roles with colors and permissions
Documentation
| Guide | Description |
|---|---|
| How to Use | Practical authentication guide with examples |
| Overview | Architecture and design patterns |
| Exports | Complete export reference |
| Events | AuthEvent types |
| Offline | Offline mode and UUID generation |
| Microsoft | Microsoft OAuth2 flow |
| Azure App ID setup | Step-by-step Azure registration + Mojang approval |
| Azuriom | Azuriom CMS authentication |
| Trait | Implementing custom Authenticator |
Related Crates
- lighty-launcher - Main package
- lighty-event - Event system (for AuthEvent)
- lighty-core - Hash utilities for offline UUID
- lighty-launch - Uses UserProfile for launching
License
MIT