games647 / FastLogin

Checks if a minecraft player has a valid paid account. If so, they can skip offline authentication automatically. (premium auto login)
https://www.spigotmc.org/resources/fastlogin.14153
MIT License
492 stars 120 forks source link

Auto-login not working for new 1.20.2 users #1119

Closed galacticwarrior9 closed 7 months ago

galacticwarrior9 commented 9 months ago

What happened?

New premium users connecting with 1.20.2 to my server - a network of 1.20.1 servers with ViaVersion running under Velocity - are not properly logged in.

In the Velocity logs, we observe:

[05:49:59] [Velocity Async Event Executor - #1/INFO] [fastlogin]: Incoming login request for SoupyWinner3551 from /REDACTED
[05:49:59] [FastLoginVelocity - Task Executor #474/INFO] [fastlogin]: Handling player SoupyWinner3551

For users who are logged in normally, we observe:

[fastlogin]: Incoming login request for Netsker from REDACTED
[fastlogin]: Handling player Netsker
[fastlogin]: Requesting premium login for registered player: Netsker

In other words, premium logins are never requested for the new 1.20.2 players. The problem does not correct itself and they are forced to connect with 1.20.1 or earlier versions.

Oddly enough, AuthMe on the auth server considers these players as logged in. But AuthMeVelocity does not, leading to the confusing situation in this screenshot:

Screenshot

In the auth server's logs, we see:

[23:34:56] [Server thread/INFO]: PhoenixTear[/REDACTED] logged in with entity id 108892 at ([newhub]90190.77254197917, 23.0, 90082.984070959)
[23:34:56] [Server thread/INFO]: [+] PhoenixTear
[23:34:56] [Craft Scheduler Thread - 1228 - AuthMe/INFO]: [AuthMe] PhoenixTear logged in [REDACTED]
[23:34:56] [Server thread/INFO]: [AuthMeVelocity] [DEBUG] LoginEvent | Start
[23:34:56] [Server thread/INFO]: [AuthMeVelocity] [DEBUG] MessageToProxy | Player Present: PhoenixTear, Player Name: PhoenixTear
[23:34:56] [Server thread/INFO]: [AuthMeVelocity] [DEBUG] LoginEvent | PreSendLoginEvent allowed
[23:34:56] [Server thread/INFO]: [FastLogin] No on-going login session for player: CraftPlayer{name=PhoenixTear} with ID 172.18.0.1:36398. 
[23:34:56] [Server thread/INFO]: [FastLogin] Setups using Minecraft proxies will start delayed when the command from the proxy is received
[23:34:57] [Server thread/INFO]: [FastLogin] Player info LOGIN command for PhoenixTear from proxy
[23:34:57] [Server thread/INFO]: [FastLogin] Delaying force login until join event fired?: true
[23:34:57] [Craft Scheduler Thread - 1247 - FastLogin/INFO]: [FastLogin] Logging player PhoenixTear in
[23:34:57] [Craft Scheduler Thread - 1247 - FastLogin/WARN]: [FastLogin] Player CraftPlayer{name=PhoenixTear} is already authenticated. Cancelling force login.

What did you expect?

Premium logins are requested for users connecting with 1.20.2.

Steps to reproduce

As far as I'm concerned, this only occurs to players who:

Plugin list

On the proxy: Plugins (24): AuthMeVelocity, BotSentry, CometSentinel, Constellation-GameLink, FastLoginVelocity, KeithAPI, LiteBans, LuckPerms, Maintenance, MCKotlin-Velocity, MiniMOTD, NuVotifier, Plan, ProxyQueues, ServerUtils, , SkinsRestorer, spark, TCPShield, Topaz, VelocityStaffChat, VLobby, VPacketEvents and VulcanVelocity

Configuration file

https://mclo.gs/5BHQUlj

Server log

See "What happened?" section.

Plugin version

1.12-SNAPSHOT-e15ea9c on both the proxy and auth server.

Platform

Velocity

Relevance

games647 commented 8 months ago

Relevant here are the log messages for the Spigot server. To verify, you are not receiving the "Incoming login request" log message for players with the newer protocol version? If that's the case we will need the ViaVersion too. FastLogin uses the standard plugin channels for communication, so I believe something goes wrong in translating this protocol.

galacticwarrior9 commented 7 months ago

Seems updating Velocity and/or ViaVersion resolved the issue - either that, or players moving onto 1.20.3+.