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 and asks for the account name and password. 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 | 30 ++- .../src/components/ui/ElyAccountModal.vue | 168 ++++++++++++++ .../MinecraftRequiredModal.vue | 29 ++- apps/app-frontend/src/helpers/auth.js | 15 ++ apps/app/build.rs | 1 + 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 + 11 files changed, 581 insertions(+), 13 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 ebc92c1..35c21fa 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) }} + + +
+ + +

@@ -67,7 +73,7 @@