Skip to content

Add Microsoft premium accounts and authenticated server connections - #4

Merged
WieszczY85 merged 1 commit into
mainfrom
codex/microsoft-premium-accounts
Oct 1, 2026
Merged

WieszczY85 merged 1 commit into
mainfrom
codex/microsoft-premium-accounts

Conversation

@WieszczY85

Copy link
Copy Markdown
Member

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:testDebugUnitTest passed 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.

@WieszczY85
WieszczY85 marked this pull request as ready for review October 1, 2026 19:32
@WieszczY85
WieszczY85 merged commit dbfb4c7 into main Oct 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant