aboutsummaryrefslogtreecommitdiff
path: root/azalea-auth/examples
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-auth/examples')
-rwxr-xr-xazalea-auth/examples/auth_manual.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/azalea-auth/examples/auth_manual.rs b/azalea-auth/examples/auth_manual.rs
index 6a9510a8..05803c87 100755
--- a/azalea-auth/examples/auth_manual.rs
+++ b/azalea-auth/examples/auth_manual.rs
@@ -18,15 +18,16 @@ async fn main() -> Result<(), Box<dyn Error>> {
Ok(())
}
+// We will be using default `client_id` and `scope`
async fn auth() -> Result<ProfileResponse, Box<dyn Error>> {
let client = reqwest::Client::new();
- let res = azalea_auth::get_ms_link_code(&client).await?;
+ let res = azalea_auth::get_ms_link_code(&client, None, None).await?;
println!(
"Go to {} and enter the code {}",
res.verification_uri, res.user_code
);
- let msa = azalea_auth::get_ms_auth_token(&client, res).await?;
+ let msa = azalea_auth::get_ms_auth_token(&client, res, None).await?;
let auth_result = azalea_auth::get_minecraft_token(&client, &msa.data.access_token).await?;
Ok(azalea_auth::get_profile(&client, &auth_result.minecraft_access_token).await?)
}