From 1b5e9eb9420c0a68f73de39c00e8d8dff6bca41d Mon Sep 17 00:00:00 2001 From: oiupoyt Date: Wed, 9 Sep 2026 21:08:11 +0530 Subject: [PATCH] fix(auth): allow offline accounts to launch game without Microsoft accounts (2.3.1-c2) - Removed upstream check in account_for_launch that blocked offline accounts from launching without a Microsoft account - Added test offline_account_for_launch_succeeds_without_microsoft - Bumped version to 2.3.1-c2 --- .github/workflows/release.yml | 5 +++-- Cargo.toml | 2 +- packages/oneclient_auth/src/service.rs | 8 +------- packages/oneclient_auth/tests/offline.rs | 26 ++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b4999407..68b329f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ on: tag: description: 'Release Tag (e.g. v2.3.1)' required: false - default: 'v2.3.1-c1' + default: 'v2.3.1-c2' type: string permissions: @@ -138,7 +138,7 @@ jobs: elif [ -n "${{ inputs.tag }}" ]; then echo "tag=${{ inputs.tag }}" >> $GITHUB_OUTPUT else - echo "tag=v2.3.1-c1" >> $GITHUB_OUTPUT + echo "tag=v2.3.1-c2" >> $GITHUB_OUTPUT fi - name: Clean up previous release if exists @@ -155,6 +155,7 @@ jobs: name: "OneLauncher-Cracked ${{ steps.release_tag.outputs.tag }}" body: | ### What's New in ${{ steps.release_tag.outputs.tag }} + - **Fixed Offline Game Launch**: Removed upstream's check that blocked offline accounts from launching the game unless at least one Microsoft account was signed in. Offline accounts can now launch directly with 0 Microsoft accounts required. - **Rebased onto Official Upstream 2.3.1**: Integrated all upstream OneLauncher 2.3.1 updates, fixes, and performance improvements. - **Offline / Cracked Accounts**: Full offline account support with customizable username and avatar caching. - **Custom Offline Skins & targeted multiplayer injection**: Custom 3D skin changer, per-account UUID hash targeting preventing multiplayer skin cloning, and automatic CustomSkinLoader config generation. diff --git a/Cargo.toml b/Cargo.toml index 30a932f3..0546a477 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ homepage = "https://polyfrost.org/projects/oneclient" license = "GPL-3.0-only" readme = "README.md" repository = "https://github.com/oiupoyt/OneLauncher-Cracked" -version = "2.3.1-c1" +version = "2.3.1-c2" [workspace.dependencies] # core diff --git a/packages/oneclient_auth/src/service.rs b/packages/oneclient_auth/src/service.rs index 136571a7..4d16c166 100644 --- a/packages/oneclient_auth/src/service.rs +++ b/packages/oneclient_auth/src/service.rs @@ -297,13 +297,7 @@ impl AuthService { #[tracing::instrument(level = "debug", skip(self), fields(%id))] pub async fn account_for_launch(&self, id: Uuid) -> AuthResult { - let account = self.renew_token(id, false).await?; - - if account.is_offline() && !self.has_microsoft_account().await { - return Err(AuthError::OfflineRequiresMicrosoft); - } - - Ok(account) + self.renew_token(id, false).await } #[tracing::instrument(level = "debug", skip_all)] diff --git a/packages/oneclient_auth/tests/offline.rs b/packages/oneclient_auth/tests/offline.rs index ec7b074a..d3deff43 100644 --- a/packages/oneclient_auth/tests/offline.rs +++ b/packages/oneclient_auth/tests/offline.rs @@ -108,3 +108,29 @@ async fn default_account_returns_expired_token_without_refreshing() { assert_eq!(account.id, msa_id); assert!(account.is_expired()); } + +#[tokio::test] +async fn offline_account_for_launch_succeeds_without_microsoft() { + isolate_launcher_dir(); + + let (events, _rx) = oneclient_events::EventBus::channel(); + let net = oneclient_net::RequestClient::new(oneclient_net::NetConfig::default()).expect("net client"); + let mut store = CredentialsStore::default(); + let offline = store.add_offline_account("Steve".into()).unwrap(); + let service = oneclient_auth::AuthService::with_store(store, net, events); + + let launched = service + .account_for_launch(offline.id) + .await + .expect("offline account must be allowed for launch without Microsoft account"); + assert_eq!(launched.id, offline.id); + assert_eq!(launched.username, "Steve"); + assert_eq!(launched.kind, AccountKind::Offline); + + let default_launched = service + .default_account_for_launch() + .await + .expect("default offline account must be allowed for launch") + .expect("default account should exist"); + assert_eq!(default_launched.id, offline.id); +}