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) }} + +