azalea/azalea-auth
mat 84f66a55a5 Release 0.10.1
azalea@0.10.1
azalea-auth@0.10.1
azalea-buf@0.10.1
azalea-chat@0.10.1
azalea-client@0.10.1
azalea-entity@0.10.1
azalea-inventory@0.10.1
azalea-protocol@0.10.1
azalea-world@0.10.1

Generated by cargo-workspaces
2024-04-24 17:56:35 -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 fix: GameOwnershipResponse key_id format (#138) 2024-03-21 13:36:15 -05:00
Cargo.toml Release 0.10.1 2024-04-24 17:56:35 -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.