Skip to content

Commit

Permalink
add additional fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Apr 25, 2024
1 parent 97a10d7 commit 3da686b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions theseus/src/state/minecraft_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ async fn sisu_authenticate(
"Query": {
"code_challenge": challenge,
"code_challenge_method": "S256",
"state": "",
"state": generate_oauth_challenge(),
"prompt": "select_account"
},
"RedirectUri": REDIRECT_URL,
Expand Down Expand Up @@ -564,6 +564,8 @@ async fn sisu_authorize(
"Sandbox": "RETAIL",
"SessionId": session_id,
"SiteName": "user.auth.xboxlive.com",
"RelyingParty": "http://xboxlive.com",
"UseModernGamertag": "true"
}),
key,
MinecraftAuthStep::SisuAuthorize,
Expand Down Expand Up @@ -863,9 +865,12 @@ async fn send_signed_request<T: DeserializeOwned>(
.post(url)
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-xbl-contract-version", "1")
.header("signature", &signature);

if url != "https://sisu.xboxlive.com/authorize" {
request = request.header("x-xbl-contract-version", "1");
}

if let Some(auth) = authorization {
request = request.header("Authorization", auth);
}
Expand Down

0 comments on commit 3da686b

Please sign in to comment.