mindstorm38 / portablemc

A fast, reliable and cross-platform command-line Minecraft launcher and API for developers. Including fast and easy installation of common mod loaders such as Fabric, Forge, NeoForge and Quilt.
https://pypi.org/project/portablemc/
GNU General Public License v3.0
354 stars 20 forks source link

Authlib-injector #211

Closed Wonkiest29 closed 2 weeks ago

Wonkiest29 commented 5 months ago

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

mindstorm38 commented 5 months ago

Please explain a bit more your request!

Wonkiest29 commented 5 months ago

i mean add function like for authlib custom

Ristovski commented 5 months ago

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

mindstorm38 commented 5 months ago

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?

Ristovski commented 5 months ago

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.

mindstorm38 commented 5 months ago

Ok I see, it seems a bit complicated actually

Wonkiest29 commented 5 months ago

@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

mindstorm38 commented 5 months ago

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.

Wonkiest29 commented 5 months ago

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

Ristovski commented 5 months ago

@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.

mindstorm38 commented 5 months ago

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?

Wonkiest29 commented 5 months ago

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