Skip to content

[Suggestion] Provide real yggdrasil auth #2

@JackOfNoneTrades

Description

@JackOfNoneTrades

Ditching the old homemade auth system in favor of a more stable implementation.
There is a java yggdrasil library: https://github.com/Litarvan/OpenAuth
Dispatching and managing skins/capes, as I remember, was really a big hack. This would allow to hook into the native system and keep compat with many mods that use skins.
I haven't looked at this mods updates, if there are custom models or other things, they could be made as a superset of the yggdrasil protocol.
This would also make it possible for people with microsoft accounts to join, of course configurable.
Logging in with a public/private keypair can also probably easily be added ontop.

I could probably work on this in the future.

Note:
It is possible to mixin into authlib, offlineauth could become a much more convenient autlib injector alternative.

import com.mojang.authlib.GameProfile;
import com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(YggdrasilMinecraftSessionService.class)
public abstract class MixinTest {
    @Inject(method = "fillProfileProperties", at = @At("HEAD"), remap = false)
    private void onFillProfileProperties(GameProfile profile, boolean requireSecure, CallbackInfoReturnable<GameProfile> cir) {
        System.out.println("lol");
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions