From 867f0e028bec702e72c41e9738a66399ab9d340b Mon Sep 17 00:00:00 2001 From: 8KV <82761117+8KV@users.noreply.github.com> Date: Sat, 20 Jun 2026 23:02:22 +0300 Subject: [PATCH 1/2] Fix TheAltening authentication --- .../accounts/types/TheAlteningAccount.java | 53 +++++++++++-------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/src/main/java/meteordevelopment/meteorclient/systems/accounts/types/TheAlteningAccount.java b/src/main/java/meteordevelopment/meteorclient/systems/accounts/types/TheAlteningAccount.java index a0a37c02c4..9d48cd4ca0 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/accounts/types/TheAlteningAccount.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/accounts/types/TheAlteningAccount.java @@ -7,18 +7,18 @@ import com.mojang.authlib.Environment; import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; -import de.florianreuth.waybackauthlib.InvalidCredentialsException; -import de.florianreuth.waybackauthlib.WaybackAuthLib; import meteordevelopment.meteorclient.MeteorClient; import meteordevelopment.meteorclient.systems.accounts.Account; import meteordevelopment.meteorclient.systems.accounts.AccountType; import meteordevelopment.meteorclient.systems.accounts.TokenAccount; import meteordevelopment.meteorclient.utils.misc.NbtException; +import meteordevelopment.meteorclient.utils.network.Http; +import com.mojang.util.UndashedUuid; import net.minecraft.client.User; import net.minecraft.nbt.CompoundTag; -import org.jetbrains.annotations.Nullable; import java.util.Optional; +import java.util.UUID; import static meteordevelopment.meteorclient.MeteorClient.mc; @@ -26,7 +26,7 @@ public class TheAlteningAccount extends Account implements T private static final Environment ENVIRONMENT = new Environment("http://sessionserver.thealtening.com", "http://authserver.thealtening.com", "https://api.mojang.com", "The Altening"); private static final YggdrasilAuthenticationService SERVICE = new YggdrasilAuthenticationService(mc.getProxy(), ENVIRONMENT); private String token; - private @Nullable WaybackAuthLib auth; + private String accessToken; public TheAlteningAccount(String token) { super(AccountType.TheAltening, token); @@ -35,19 +35,19 @@ public TheAlteningAccount(String token) { @Override public boolean fetchInfo() { - auth = getAuth(); - try { - auth.logIn(); - - cache.username = auth.getCurrentProfile().name(); - cache.uuid = auth.getCurrentProfile().id().toString(); + AuthResponse res = authenticate(); + if (res == null || res.accessToken == null || res.selectedProfile == null) { + MeteorClient.LOG.error("Invalid TheAltening credentials."); + return false; + } + + accessToken = res.accessToken; + cache.username = res.selectedProfile.name; + cache.uuid = res.selectedProfile.id; cache.loadHead(); return true; - } catch (InvalidCredentialsException _) { - MeteorClient.LOG.error("Invalid TheAltening credentials."); - return false; } catch (Exception _) { MeteorClient.LOG.error("Failed to fetch info for TheAltening account!"); return false; @@ -56,11 +56,11 @@ public boolean fetchInfo() { @Override public boolean login() { - if (auth == null) return false; + if (accessToken == null || cache.username.isEmpty() || cache.uuid.isEmpty()) return false; applyLoginEnvironment(SERVICE); try { - setSession(new User(auth.getCurrentProfile().name(), auth.getCurrentProfile().id(), auth.getAccessToken(), Optional.empty(), Optional.empty())); + setSession(new User(cache.username, UndashedUuid.fromStringLenient(cache.uuid), accessToken, Optional.empty(), Optional.empty())); return true; } catch (Exception _) { MeteorClient.LOG.error("Failed to login with TheAltening."); @@ -68,13 +68,10 @@ public boolean login() { } } - private WaybackAuthLib getAuth() { - WaybackAuthLib auth = new WaybackAuthLib(ENVIRONMENT.servicesHost()); - - auth.setUsername(name); - auth.setPassword("Meteor on Crack!"); - - return auth; + private AuthResponse authenticate() { + return Http.post(ENVIRONMENT.servicesHost() + "/authenticate") + .bodyJson(new AuthRequest("MINECRAFT", token, "LiquidBounce", UUID.randomUUID().toString(), true)) + .sendJson(AuthResponse.class); } @Override @@ -105,4 +102,16 @@ public TheAlteningAccount fromTag(CompoundTag tag) { return this; } + + private record AuthRequest(String agent, String username, String password, String clientToken, boolean requestUser) {} + + private static class AuthResponse { + public String accessToken; + public AuthProfile selectedProfile; + } + + private static class AuthProfile { + public String id; + public String name; + } } From a2e15c9bbec4a5f292123f52080439c05e6913d9 Mon Sep 17 00:00:00 2001 From: 8KV <82761117+8KV@users.noreply.github.com> Date: Sat, 27 Jun 2026 00:46:55 +0300 Subject: [PATCH 2/2] Update authentication request to use a Meteor related password --- .../meteorclient/systems/accounts/types/TheAlteningAccount.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/meteordevelopment/meteorclient/systems/accounts/types/TheAlteningAccount.java b/src/main/java/meteordevelopment/meteorclient/systems/accounts/types/TheAlteningAccount.java index 9d48cd4ca0..b942e909ea 100644 --- a/src/main/java/meteordevelopment/meteorclient/systems/accounts/types/TheAlteningAccount.java +++ b/src/main/java/meteordevelopment/meteorclient/systems/accounts/types/TheAlteningAccount.java @@ -70,7 +70,7 @@ public boolean login() { private AuthResponse authenticate() { return Http.post(ENVIRONMENT.servicesHost() + "/authenticate") - .bodyJson(new AuthRequest("MINECRAFT", token, "LiquidBounce", UUID.randomUUID().toString(), true)) + .bodyJson(new AuthRequest("MINECRAFT", token, "Meteor on Crack!", UUID.randomUUID().toString(), true)) .sendJson(AuthResponse.class); }