1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00
azalea/azalea-auth
2025-04-13 05:30:40 +03:00
..
examples remove executable bit from files 2025-04-04 15:56:06 +00:00
src remove executable bit from files 2025-04-04 15:56:06 +00:00
Cargo.toml release 0.12.0+mc1.21.5 2025-04-13 05:30:40 +03:00
README.md remove executable bit from files 2025-04-04 15:56:06 +00:00

Azalea Auth

A port of Mojang's Authlib and launcher authentication.

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.