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
482 stars 119 forks source link

Automatic login not working for bedrocks players #1173

Closed GabrielMoreiradeSouza closed 1 month ago

GabrielMoreiradeSouza commented 3 months ago

What happened?

Recently, I updated FastLogin to the latest version, which is the developer version. However, after this update, players on the Bedrock platform can no longer log in without a password. This has become an issue because existing players on the server had to go through the inconvenience of generating a password themselves since the old passwords were generated by FastLogin and they didn't have access to them. Additionally, new Bedrock platform players are also required to go through the registration process instead of being able to log in directly.

What did you expect?

I would like new players on the Bedrock platform to be able to go through authentication without the need for a password, and for the players who were already playing without a password to continue without it, without being prompted to enter a password as it's happening now.

Steps to reproduce

No response

Plugin list

https://hastebin.com/share/epiwudukev.java

Configuration file

https://hastebin.com/share/nabuziqomi.yaml

Server log

No response

Plugin version

1.12-SNAPSHOT-a65a5f3

Platform

BungeeCord

Relevance

Gobix0101 commented 3 months ago

Hey guys. I'm having the same problem!

bobhenl commented 3 months ago

Me too on velocity

womzil commented 2 months ago

Downgrading to build 1297 fixed this issue for me.

PaoloWeekly commented 2 months ago

Has this issue been fixed? I'll remain in build #1297 until this issue has been resolved!

wtlgo commented 1 month ago

It means that something in this diff has caused the bedrock login to stop working https://github.com/games647/FastLogin/compare/4cf65cf..a65a5f3

The only difference that changes the behavior of the plugin in a somewhat impactful way I see is this one

// Was
        plugin.getProxy().getScheduler()
                .buildTask(plugin, () -> plugin.getScheduler().runAsync(loginTask))
                .delay(1L, TimeUnit.SECONDS) // Delay at least one second, otherwise the login command can be missed
                .schedule();

// Became
        plugin.getProxy().getScheduler()
                .buildTask(plugin, loginTask)
                .delay(1L, TimeUnit.SECONDS) // Delay at least one second, otherwise the login command can be missed
                .schedule();

So, theoretically, reverting it might help to solve the issue. Sadly, I can't test this assumption, because my machine refuses to build the plugin.

UPD. Though on second thought, how this change can do something on Bukkit if this part of the code is related to Velocity? It means the cause of the issue must be somewhere else. Perhaps, re-implementation of TimeRecord? I'm not sure.

games647 commented 1 month ago

@wtlgo Maybe it could be also the configuration parsing change. I reverted the commit. Let's see if that works for you.

FastLogin-issue-1173.zip

Code-Branch: https://github.com/games647/FastLogin/tree/floodgate-1173

wtlgo commented 1 month ago

@wtlgo Maybe it could be also the configuration parsing change. I reverted the commit. Let's see if that works for you.

FastLogin-issue-1173.zip

Code-Branch: https://github.com/games647/FastLogin/tree/floodgate-1173

Yeah, I also suspected that. I even tried to test it by changing true with 'true' in the config. But right when I tried to restart the server, my hosting collapsed, so we need to wait a little (~24 hours) before I can test that. Meanwhile, someone in the conversation might try it too.

wtlgo commented 1 month ago

@games647 I finally had an opportunity to test it. Yes, your version or switching autoLoginFloodgate: true to autoLoginFloodgate: 'true' in the latest version does help. I suspect it's because the yml parser checks the type, and since the value is Boolean, and not String, getString just returns an empty value. I think reverting the line to .get("autoLoginFloodgate").toString() will resolve the issue. Other parts of that commit look good, the new implementation of Comparable is how it is supposed to be.

GabrielMoreiradeSouza commented 1 month ago

I will not update the plugin until everything is properly resolved. In the past, I lost many Bedrock players when I had to reset everyone's passwords, and even then, some chose to leave the server. I don't want to take that risk again, especially now that nearly half of my player base is composed of Bedrock players. Please keep me informed of any updates.

wtlgo commented 1 month ago

@GabrielMoreiradeSouza don't you test your setup separately before putting it into production? If you don't, you probably should start doing that, it will save you from such incidents in the future.