yushijinhun / authlib-injector

Build your own Minecraft authentication system.
https://authlib-injector.yushi.moe
GNU Affero General Public License v3.0
728 stars 66 forks source link

1.20版本中白名单存在问题 #232

Closed Linwendong83 closed 4 months ago

Linwendong83 commented 6 months ago

1.19.4:可直接whitelist add (usercache.json内还未出现的玩家) 1.20.4:That player does not exist

[authlib-injector] [DEBUG] Reverse proxy: > POST http://xxxxxxxxxxx/api/yggdrasil/minecraftservices/minecraft/profile/lookup/bulk/byname, headers: {content-type=application/json; charset=utf-8, cache-control=no-cache, pragma=no-cache, user-agent=Java/17.0.7, accept=text/html, image/gif, image/jpeg, ; q=.2, /*; q=.2, content-length=11} [authlib-injector] [DEBUG] Reverse proxy: < 404 Not Found , headers: {date=[Mon, 01 Jan 2024 15:21:56 GMT], Cache-Control=[no-cache, private], Server=[nginx], X-Authlib-Injector-API-Location=[http://xxxxxxx/api/yggdrasil], Set-Cookie=[locale=en; expires=Mon, 01-Jan-2024 17:21:56 GMT; Max-Age=7200; path=/; httponly; samesite=lax], Vary=[Accept-Encoding], Content-Type=[text/html; charset=UTF-8]}

Silverteal commented 5 months ago

此问题似乎是由yggdrasil服务器引起的。authlib-injector应该不直接处理请求。 更新:标准文档可能需要相应做出调整

yige233 commented 5 months ago

As of 23w42a, the endpoint moved to:

POST https://api.minecraftservices.com/minecraft/profile/lookup/bulk/byname

_https://wiki.vg/Mojang_API#Username_to_UUID_

应该是由于这个原因吧,从玩家名称查询 uuid 的 api 迁移了,在authlib-injector的作用下游戏向http://xxxxxxxxxxx/api/yggdrasil/minecraftservices/minecraft/profile/lookup/bulk/byname发出了查询玩家uuid的请求,然而由于验证服务器没有实现这个api,所以返回了404

可以由authlib-injector在内部将请求重定向到旧的api,或者由验证服务器去实现新的api来解决