lighty-auth

Multi-provider authentication system for Minecraft launchers with OAuth2 and CMS integrations.

Overview

Version: 0.8.6 Part of: LightyLauncherarrow-up-right

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 Authenticator trait for your own auth system

Quick Start

[dependencies]
lighty-auth = "0.8.6"

Offline Authentication

use lighty_auth::{offline::OfflineAuth, Authenticator};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let mut auth = OfflineAuth::new("PlayerName");

    #[cfg(feature = "events")]
    let profile = auth.authenticate(None).await?;

    #[cfg(not(feature = "events"))]
    let profile = auth.authenticate().await?;

    println!("Username: {}", profile.username);
    println!("UUID: {}", profile.uuid);

    Ok(())
}

Microsoft Authentication

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 Authenticator for 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

📚 Complete Documentationarrow-up-right

Guide
Description

Practical authentication guide with examples

Architecture and design patterns

Complete export reference

AuthEvent types

Offline mode and UUID generation

Microsoft OAuth2 flow

Azuriom CMS authentication

Implementing custom Authenticator

License

MIT

Last updated