Skip to content

Commit

Permalink
fix: do not check for ownership on MSA account
Browse files Browse the repository at this point in the history
support for gamepass account
  • Loading branch information
1zun4 committed Jun 12, 2024
1 parent bec8bcf commit c10cfb1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src-tauri/src/minecraft/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use anyhow::Result;

use azalea_auth::{
cache::ExpiringValue, check_ownership, get_minecraft_token, get_ms_auth_token, get_ms_link_code, get_profile, refresh_ms_auth_token, AccessTokenResponse, AuthError, MinecraftAuthResponse, ProfileResponse, XboxLiveAuth
cache::ExpiringValue, get_minecraft_token, get_ms_auth_token, get_ms_link_code, get_profile, refresh_ms_auth_token, AccessTokenResponse, AuthError, MinecraftAuthResponse, ProfileResponse, XboxLiveAuth
};
use serde::{Deserialize, Serialize};
use tracing::{error, trace};
Expand Down Expand Up @@ -178,12 +178,6 @@ async fn login_msa(msa: ExpiringValue<AccessTokenResponse>) -> Result<MinecraftA
trace!("Got access token: {msa_token}");

let minecraft = get_minecraft_token(&HTTP_CLIENT, msa_token).await?;

let has_game = check_ownership(&HTTP_CLIENT, &minecraft.minecraft_access_token).await?;
if !has_game {
return Err(AuthError::DoesNotOwnGame);
}

let profile = get_profile(&HTTP_CLIENT, &minecraft.minecraft_access_token).await?;

// Return account
Expand Down

0 comments on commit c10cfb1

Please sign in to comment.