fix(auth): allow offline accounts to launch game without Microsoft accounts (2.3.1-c2)
Some checks are pending
Release Multiplatform Binaries / build (deb,appimage, linux-x86_64, ubuntu-22.04, x86_64-unknown-linux-gnu) (push) Waiting to run
Release Multiplatform Binaries / build (dmg,app, macos-arm64, macos-14, aarch64-apple-darwin) (push) Waiting to run
Release Multiplatform Binaries / build (dmg,app, macos-x86_64, macos-14, x86_64-apple-darwin) (push) Waiting to run
Release Multiplatform Binaries / build (nsis, windows-x86_64, windows-latest, x86_64-pc-windows-msvc) (push) Waiting to run
Release Multiplatform Binaries / create-release (push) Blocked by required conditions

- 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
This commit is contained in:
katR 2026-09-09 21:08:11 +05:30
parent 163eb0ac0c
commit 1b5e9eb942
4 changed files with 31 additions and 10 deletions

View file

@ -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.

View file

@ -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

View file

@ -297,13 +297,7 @@ impl AuthService {
#[tracing::instrument(level = "debug", skip(self), fields(%id))]
pub async fn account_for_launch(&self, id: Uuid) -> AuthResult<MinecraftAccount> {
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)]

View file

@ -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);
}