Repository navigation
Add Microsoft premium accounts and authenticated server connections - #4
Merged
Merged
Conversation
WieszczY85
marked this pull request as ready for review
October 1, 2026 19:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Account manager previously stored only offline names and every server connection used an offline identity. This adds Microsoft device-code sign-in in the system browser, Java entitlement/profile verification, immutable premium identities, and selection of a premium account for online-mode connections.
Refresh tokens are encrypted using Android Keystore in noBackupFilesDir; access tokens remain in memory. Sessions refresh before connecting, and deleting the active premium account disconnects it and removes local credentials. The protocol adapter performs Mojang session join, RSA challenge response and AES/CFB8 transport encryption, with no fallback from a premium account to an offline identity.
Validation:
:app:assembleDebug,:app:lintDebug, and:app:testDebugUnitTestpassed locally; 83 tests, zero failures. Added tests cover OAuth polling/expiry/denial, entitlement and approval failures, refresh/deletion/cancellation, account selection, and a local encrypted/compressed TCP handshake and keep-alive for protocols 775–777.Before live validation, Entra must allow personal Microsoft accounts and public client flows, and Mojang must approve client ID 931c77bd-a884-457d-9dbd-da85c2fca433. These external settings were not changed. Real Microsoft consent, Android Keystore/browser behavior, and a live online-mode server remain untested. Signed chat/profile certificates are not implemented; servers requiring a secure chat profile may reject connection or chat. See docs/MICROSOFT_ACCOUNTS.md for setup and limits.