aboutsummaryrefslogtreecommitdiff
path: root/azalea-auth/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-01-06 18:16:11 -0600
committermat <git@matdoes.dev>2024-01-06 18:16:11 -0600
commit5ea127114582e3320381d09e880f6a433ccb8710 (patch)
tree0a6f56ecf94260334a11ce81b532226346cb86ba /azalea-auth/src
parent1347f3549282397be6a46b8b7cb76a7900d0690a (diff)
downloadazalea-drasl-5ea127114582e3320381d09e880f6a433ccb8710.tar.xz
add doc comment about d=
Diffstat (limited to 'azalea-auth/src')
-rwxr-xr-xazalea-auth/src/auth.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/azalea-auth/src/auth.rs b/azalea-auth/src/auth.rs
index 67a45aa3..7b5846c4 100755
--- a/azalea-auth/src/auth.rs
+++ b/azalea-auth/src/auth.rs
@@ -140,6 +140,9 @@ pub async fn auth(email: &str, opts: AuthOpts) -> Result<AuthResult, AuthError>
///
/// If you don't have a Microsoft auth token, you can get it from
/// [`get_ms_link_code`] and then [`get_ms_auth_token`].
+///
+/// If you got the MSA token from your own app (as opposed to the default
+/// Nintendo Switch one), you may have to prepend "d=" to the token.
pub async fn get_minecraft_token(
client: &reqwest::Client,
msa: &str,
@@ -418,9 +421,9 @@ async fn auth_with_xbox_live(
"Properties": {
"AuthMethod": "RPS",
"SiteName": "user.auth.xboxlive.com",
- // i thought this was supposed to be d={} but it doesn't work for
- // me when i add it ??????
- "RpsTicket": format!("{access_token}")
+ // this value should have "d=" prepended if you're using your own app (as opposed to
+ // the default nintendo switch one)
+ "RpsTicket": access_token
},
"RelyingParty": "http://auth.xboxlive.com",
"TokenType": "JWT"