elyby / accounts

Authentication service for the Ely.by and Minecraft
https://account.ely.by
Apache License 2.0
24 stars 6 forks source link

Resolve "offline" UUIDs to correct players #32

Open evan-goode opened 10 months ago

evan-goode commented 10 months ago

We've had a number of PollyMC users complain that skins are not visible when using an authlib-injector+Ely.by client with an online-mode=false server: https://github.com/fn2006/PollyMC/issues/107, https://github.com/fn2006/PollyMC/issues/58. The authlib-injector client does attempt to load player skins from the API server even on online-mode=false servers, but it requests them via the player's "offline UUID" (derived from the player's username), and Ely.by responds with a 204 No Content.

What if Ely.by tried to find players by their "offline UUID" if the requested UUID can't be found? At least for the /sessionserver/session/minecraft/profile/<UUID> route used by the client to get player skins. I implemented this behavior in my authentication server: https://github.com/unmojang/drasl/commit/e8537ea54c1068ae10cef0aaf1ce821698c5d648, and it seems to work well. I calculate and store the player's offline UUID everytime their username is changed, and then on some API routes, I fall back to looking up by offline UUID if the requested UUID can't be found.

Another, possibly better approach to solve the problem would be to modify authlib-injector to look up skins by player name in offline mode, like Ely.by's patched authlib seems to do. I've asked the developers about it, but they haven't gotten back to me yet.

evan-goode commented 10 months ago

Happy to prepare a PR if desired.

erickskrauch commented 10 months ago

Thank you for the issue. I'm very sick right now and can't fully immerse myself in this issue. But I will definitely come back to it when I feel better.

evan-goode commented 10 months ago

Sorry to hear that, hope you get some rest, no rush.

Saiv46 commented 6 months ago

@evan-goode Hi there! Looks like this is out of scope of Ely.by project and instead issue should be yushijinhun/authlib-injector