azalea-auth

Crates.ioazalea-auth
lib.rsazalea-auth
version0.13.0+mc1.21.5
created_at2022-08-30 02:25:52.651101+00
updated_at2025-06-16 00:22:37.762355+00
descriptionA port of Mojang's Authlib and launcher authentication.
homepage
repositoryhttps://github.com/azalea-rs/azalea
max_upload_size
id654884
size98,346
mat (mat-1)

documentation

README

Azalea Auth

A port of Mojang's Authlib and launcher authentication.

The default location of Azalea's cache is at ~/.minecraft/azalea-auth.json. You can delete or modify this file if you'd like to associate an email with a different account.

Examples

use std::path::PathBuf;

#[tokio::main]
async fn main() {
    let cache_file = PathBuf::from("example_cache.json");

    let auth_result = azalea_auth::auth(
        "example@example.com",
        azalea_auth::AuthOpts {
            cache_file: Some(cache_file),
            ..Default::default()
        },
    )
    .await
    .unwrap();
    println!("{auth_result:?}");
}

Thanks to wiki contributors, Overhash, and prismarine-auth contributors.

Commit count: 1506

cargo fmt