azalea/azalea-auth
2023-09-08 16:51:32 -05:00
..
examples Add functions auth_with_link_code, get_ms_link_code, and get_ms_auth_token. (#88) 2023-06-24 17:09:43 -05:00
src Add functions auth_with_link_code, get_ms_link_code, and get_ms_auth_token. (#88) 2023-06-24 17:09:43 -05:00
Cargo.toml upgrade deps 2023-09-08 16:51:32 -05:00
README.md Use an ECS (#52) 2023-02-04 19:32:27 -06: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.vg contributors, Overhash, and prismarine-auth contributors.