diff --git a/crates/core/src/store/minecraft.rs b/crates/core/src/store/minecraft.rs index 3ecfad40..779f177f 100644 --- a/crates/core/src/store/minecraft.rs +++ b/crates/core/src/store/minecraft.rs @@ -508,7 +508,7 @@ async fn oauth_token( query.insert("scope", SCOPES); let res = auth_retry(|| { crate::utils::http::REQWEST_CLIENT - .post(REDIRECT_URL) + .post("https://login.live.com/oauth20_token.srf") .header("Accept", "application/json") .form(&query) .send() @@ -555,7 +555,7 @@ async fn oauth_refresh( query.insert("scope", SCOPES); let res = auth_retry(|| { crate::utils::http::REQWEST_CLIENT - .post(REDIRECT_URL) + .post("https://login.live.com/oauth20_token.srf") .header("Accept", "application/json") .form(&query) .send() @@ -657,13 +657,13 @@ async fn xsts_authorize( "/xsts/authorize", json!({ "RelyingParty": "rp://api.minecraftservices.com/", - "TokenType": "JWT", - "Properties": { - "SandboxId": "RETAIL", - "UserTokens": [authorize.user_token.token], - "DeviceTokens": device_token, - "TitleToken": authorize.title_token.token, - }, + "TokenType": "JWT", + "Properties": { + "SandboxId": "RETAIL", + "UserTokens": [authorize.user_token.token], + "DeviceToken": device_token, + "TitleToken": authorize.title_token.token, + }, }), key, MinecraftAuthStep::XstsAuthorize, @@ -739,7 +739,7 @@ struct MinecraftProfile { async fn minecraft_profile(token: &str) -> Result { let res = auth_retry(|| { crate::utils::http::REQWEST_CLIENT - .get("https//api.minecraftservices.com/minecraft/profile") + .get("https://api.minecraftservices.com/minecraft/profile") .header("Accept", "application/json") .bearer_auth(token) .send() diff --git a/crates/testing/src/main.rs b/crates/testing/src/main.rs index 85ee887b..422ff2bb 100644 --- a/crates/testing/src/main.rs +++ b/crates/testing/src/main.rs @@ -4,6 +4,7 @@ )] use onelauncher::prelude::*; +use onelauncher::cluster::create::create_cluster; pub async fn authenticate_mc() -> onelauncher::Result { println!("a browser will open, follow login flow"); @@ -47,7 +48,6 @@ async fn main() -> onelauncher::Result<()> { state.settings.write().await.max_async_fetches = 100; state.settings.write().await.init_hooks.post = Some("echo this should run after minecraft as a global hook".to_string()); - // test changing fetch settings and resetting the semaphore state.reset_fetch_semaphore().await; println!("clearing clusters"); @@ -63,7 +63,7 @@ async fn main() -> onelauncher::Result<()> { let loader = Loader::Vanilla; let loader_version = "stable".to_string(); - let cluster = create::create_cluster( + let cluster = create_cluster( name.clone(), game, loader,