aboutsummaryrefslogtreecommitdiff
path: root/azalea-auth/examples/auth.rs
blob: 350c5b179ee6f74db881797999b12daa4044ff9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use std::path::PathBuf;

#[tokio::main]
async fn main() {
    env_logger::init();

    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:?}");
}