azalea_auth

Function get_minecraft_token

Source
pub async fn get_minecraft_token(
    client: &Client,
    msa: &str,
) -> Result<MinecraftTokenResponse, AuthError>
Expand description

Authenticate with Minecraft when we already have a Microsoft auth token.

Usually you don’t need this since auth will call it for you, but it’s useful if you want more control over what it does.

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.