From d0528cc1b8421f8e898ca988712dbc10ba66b2ea Mon Sep 17 00:00:00 2001 From: Felitendo Date: Mon, 14 Sep 2026 13:26:06 +0200 Subject: [PATCH] feat: add ely.by accounts --- README.md | 37 +- patches/0005-Add-offline-accounts.patch | 15 +- ...rvers-in-the-sidebar-and-fold-away-t.patch | 4 +- patches/0007-Add-Ely.by-accounts.patch | 760 ++++++++++++++++++ scripts/check.sh | 14 + 5 files changed, 821 insertions(+), 9 deletions(-) create mode 100644 patches/0007-Add-Ely.by-accounts.patch diff --git a/README.md b/README.md index f60e4b3..fe1be50 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Modrinth Enhanced The [Modrinth App](https://github.com/modrinth/code), without advertising, without telemetry, and -with offline accounts. +with offline and Ely.by accounts. Everything else is deliberately left alone. This repository holds no forked source code — only a series of patches that are applied to an upstream release tag, built, and published. Whenever @@ -13,11 +13,13 @@ works. | Patch | What it does | | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `0001-Rename-the-app-to-Modrinth-Enhanced` | Product name, binary name, window title, version label, and an "Enhanced" pill next to the wordmark. | -| `0002-Use-the-Modrinth-Enhanced-icon` | The Modrinth mark with a sparkle badge, rendered into every icon the bundles need. The vector source ships alongside them. | -| `0003-Remove-advertising` | The sidebar ad slot, the "Upgrade to Modrinth+" nag and the ad cookie consent prompt. The ad webview is never created. | -| `0004-Remove-telemetry` | PostHog analytics, Sentry crash reporting, the Tally survey embed, and the playtime and server-play reports the launcher sends to Modrinth. | -| `0005-Add-offline-accounts` | A second way to add a Minecraft account that never contacts Microsoft or Mojang. | +| `0001-Rename-the-app-to-Modrinth-Enhanced` | Product name, binary name, window title and version label. | +| `0002-Use-the-Modrinth-Enhanced-icon` | The Modrinth mark with a sparkle badge on a green disc, rendered into every icon the bundles need. Both vector sources ship alongside them. | +| `0003-Remove-advertising` | The sidebar ad slot, the "Upgrade to Modrinth+" nag and the ad cookie consent prompt. The ad webview is never created. | +| `0004-Remove-telemetry` | PostHog analytics, Sentry crash reporting, the Tally survey embeds, and the playtime and server-play reports the launcher sends to Modrinth. | +| `0005-Add-offline-accounts` | A way to add a Minecraft account that never contacts Microsoft or Mojang. | +| `0006-Hide-Modrinth-Servers-...` | Modrinth Servers off in the sidebar by default, and a news section that folds away and stays folded. | +| `0007-Add-Ely.by-accounts` | Sign in with Ely.by, launched through authlib-injector. | ### Offline accounts @@ -31,6 +33,29 @@ in online mode reject them, as they do in every other launcher. Microsoft sign-in is untouched and still the default. +### Ely.by accounts + +"Add Ely.by account" sits in the same account card. It asks for an Ely.by account name or email and +a password, which go to `authserver.ely.by` and nowhere else. With two-factor authentication on, +append the current code to the password after a colon, which is Ely.by's own convention. + +At launch the game is pointed at Ely.by with +[authlib-injector](https://github.com/yushijinhun/authlib-injector), downloaded once and cached, so +such an account can play singleplayer and join any server that accepts Ely.by. + +The account is stored in the same table as every other one, marked by the client token Ely.by +issues; the token pair is checked and renewed against Ely.by a few times a day rather than on every +read of the account list. + +Signing in on Ely.by's own page instead of in this form would be better, and needs an OAuth +application registered with Ely.by — one has not been registered for Modrinth Enhanced. + +### Sidebar and news + +Modrinth Servers is hidden from the left sidebar by default and can be switched back on under +Settings > Features > Sidebar. The news section in the right sidebar folds away by clicking its +heading and stays that way across restarts. + ### What is *not* removed Download attribution still happens. It is a header on downloads you already asked for, and it is diff --git a/patches/0005-Add-offline-accounts.patch b/patches/0005-Add-offline-accounts.patch index 194f915..80d8fd1 100644 --- a/patches/0005-Add-offline-accounts.patch +++ b/patches/0005-Add-offline-accounts.patch @@ -22,6 +22,7 @@ data when they are opened elsewhere. Usernames are validated the way Mojang validates them: 3 to 16 characters of letters, numbers and underscores. --- + Cargo.lock | 1 + Cargo.toml | 1 + .../src/components/ui/AccountsCard.vue | 25 ++++ .../src/components/ui/OfflineAccountModal.vue | 136 ++++++++++++++++++ @@ -30,9 +31,21 @@ characters of letters, numbers and underscores. packages/app-lib/Cargo.toml | 1 + packages/app-lib/src/api/minecraft_auth.rs | 39 +++++ packages/app-lib/src/state/minecraft_auth.rs | 68 +++++++++ - 8 files changed, 290 insertions(+) + 9 files changed, 291 insertions(+) create mode 100644 apps/app-frontend/src/components/ui/OfflineAccountModal.vue +diff --git a/Cargo.lock b/Cargo.lock +index d40a959..95bc842 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -11384,6 +11384,7 @@ dependencies = [ + "indicatif", + "itertools 0.14.0", + "json5", ++ "md-5", + "modrinth-content-management", + "notify", + "notify-debouncer-mini", diff --git a/Cargo.toml b/Cargo.toml index a4a779c..a85f576 100644 --- a/Cargo.toml diff --git a/patches/0006-Hide-Modrinth-Servers-in-the-sidebar-and-fold-away-t.patch b/patches/0006-Hide-Modrinth-Servers-in-the-sidebar-and-fold-away-t.patch index 37de057..dc5a56a 100644 --- a/patches/0006-Hide-Modrinth-Servers-in-the-sidebar-and-fold-away-t.patch +++ b/patches/0006-Hide-Modrinth-Servers-in-the-sidebar-and-fold-away-t.patch @@ -18,7 +18,7 @@ restart without needing a settings migration: 4 files changed, 59 insertions(+), 3 deletions(-) diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue -index 33c29ce..4c3663f 100644 +index 33c29ce..1cab873 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -11,6 +11,7 @@ import { @@ -39,7 +39,7 @@ index 33c29ce..4c3663f 100644 +// remembers its collapsed sections. +const newsCollapsed = computed(() => appSettings.getFeatureFlag('news_collapsed')) + -+function setNewsCollapsed(collapsed: boolean) { ++function setNewsCollapsed(collapsed) { + appSettings.featureFlags.news_collapsed = collapsed + getSettings() + .then((settings) => { diff --git a/patches/0007-Add-Ely.by-accounts.patch b/patches/0007-Add-Ely.by-accounts.patch new file mode 100644 index 0000000..02c9c6f --- /dev/null +++ b/patches/0007-Add-Ely.by-accounts.patch @@ -0,0 +1,760 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Modrinth Enhanced +Date: Mon, 14 Sep 2026 13:24:41 +0200 +Subject: [PATCH] Add Ely.by accounts + +Ely.by is an alternative Minecraft account system. "Add Ely.by account" +sits next to the Microsoft and offline options in the account card; the +account name and password go to authserver.ely.by and nowhere else, and +a two-factor code is appended to the password after a colon, which is +Ely.by's own convention. + +Minecraft asks Mojang who the player is, so an Ely.by account cannot +start the game on its own. The authlib-injector agent points those calls +at Ely.by instead; it is downloaded once and cached, after which such an +account launches with no network at all. + +Like offline accounts, an Ely.by account is a row in `minecraft_users` +rather than a table of its own, so no migration is needed: the client +token Ely.by issues alongside the access token lives behind a marker in +the refresh token column, which is both what renews the pair and what +identifies the account. The expiry column becomes "check again after" - +Ely.by does not say when its tokens expire - so the pair is validated +and, if needed, renewed a few times a day instead of on every read of +the account list. + +Signing in on Ely.by's own page would be better than a password form, +and needs an OAuth application registered with Ely.by; there is none for +Modrinth Enhanced yet. +--- + .../src/components/ui/AccountsCard.vue | 25 +- + .../src/components/ui/ElyAccountModal.vue | 166 ++++++++++++++ + apps/app-frontend/src/helpers/auth.js | 15 ++ + apps/app/src/api/auth.rs | 10 + + packages/app-lib/src/api/minecraft_auth.rs | 34 +++ + packages/app-lib/src/launcher/mod.rs | 16 ++ + packages/app-lib/src/state/minecraft_auth.rs | 213 +++++++++++++++++- + packages/app-lib/src/util/authlib_injector.rs | 77 +++++++ + packages/app-lib/src/util/mod.rs | 1 + + 9 files changed, 551 insertions(+), 6 deletions(-) + create mode 100644 apps/app-frontend/src/components/ui/ElyAccountModal.vue + create mode 100644 packages/app-lib/src/util/authlib_injector.rs + +diff --git a/apps/app-frontend/src/components/ui/AccountsCard.vue b/apps/app-frontend/src/components/ui/AccountsCard.vue +index e695a6d..3f694db 100644 +--- a/apps/app-frontend/src/components/ui/AccountsCard.vue ++++ b/apps/app-frontend/src/components/ui/AccountsCard.vue +@@ -9,6 +9,10 @@ + + {{ formatMessage(messages.signInToMinecraft) }} + ++ + ++ +