mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
* Add option for grabbing authentication code for Microsoft seperately. Created two new functions, one that outputs the DeviceCodeResponse and one that uses this response to authenticate an actual account. * Added documentation and cleaned up function names. Still wondering about code repeition * reduce code duplication, more docs, cleanup * clippy --------- Co-authored-by: mat <git@matdoes.dev> |
||
---|---|---|
.. | ||
examples | ||
src | ||
Cargo.toml | ||
README.md |
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.