portablemc icon indicating copy to clipboard operation
portablemc copied to clipboard

Authlib-injector

Open Wonkiest29 opened this issue 10 months ago • 12 comments

Add func for https://github.com/yushijinhun/authlib-injector

Wonkiest29 avatar Apr 18 '24 23:04 Wonkiest29

Please explain a bit more your request!

mindstorm38 avatar Apr 19 '24 08:04 mindstorm38

i mean add function like for authlib custom

Wonkiest29 avatar Apr 20 '24 18:04 Wonkiest29

@Wonkiest29 That still doesn't explain what the exact functionality you would like is.

Ristovski avatar Apr 20 '24 18:04 Ristovski

Sorry, but I don't really know for what authlib-injector is used. You mean that you should be able to add the JAR manually to the game's classpath?

mindstorm38 avatar Apr 20 '24 18:04 mindstorm38

From what I can gather, authlib-injector allows you to create your own custom auth server instead of using the Mojang one. The problem is, in order to work it would explicitly need to be supported by the launcher as well in order to pass the tokens (and the jar is loaded as a java agent to "patch" the Java-side of things).

Seems like out of scope for PMC as this functionality should be implemented as an addon or custom script via the API instead.

Ristovski avatar Apr 20 '24 18:04 Ristovski

Ok I see, it seems a bit complicated actually

mindstorm38 avatar Apr 21 '24 09:04 mindstorm38

@Wonkiest29 That still doesn't explain what the exact functionality you would like is.

sorry, i mean add func for custom auth mojang yea i know that require additional server like auth server but probable need in launcher too

Wonkiest29 avatar Apr 21 '24 17:04 Wonkiest29

Allowing custom authentication is an interesting topic, however this issue is not descriptive enough for me to really understand what's currently missing in the launcher. It looks like authlib-injector can be enabled with the java agent and JVM arguments, which can already be specified using --jvm-args argument when starting the game.

mindstorm38 avatar Apr 23 '24 18:04 mindstorm38

you think will be work via args? okay maybe i try smth and make PR

Wonkiest29 avatar Apr 23 '24 23:04 Wonkiest29

@mindstorm38 From what I can tell, the injected jar only serves the purpose to make Minecraft aware of the custom authentication when verifying the tokens it receives from the launcher.

To have this fully working, there would need to be launcher-side functionality that actually "logs in" with the custom authentication.

Hence why I said this should be an addon to PMC rather than a core functionality, as I feel like its out of scope for the base launcher itself.

Ristovski avatar Apr 24 '24 14:04 Ristovski

Yes it feels a bit out of scope but it can still be relevant to have some command line flags, like uuid and username, to give a custom token?

mindstorm38 avatar Apr 25 '24 11:04 mindstorm38

Yes it feels a bit out of scope but it can still be relevant to have some command line flags, like uuid and username, to give a custom token?

But that need inject authlib

Wonkiest29 avatar Apr 28 '24 22:04 Wonkiest29