PiggyArchive / PiggyAuth

Safe & feature-rich auth plugin. Project has been discontinued
Apache License 2.0
33 stars 8 forks source link

Async login/register #76

Closed SalmonDE closed 7 years ago

SalmonDE commented 7 years ago

Due to lag spikes mentioned in #56 I opened this pr to add asynchronous login and register. It is configurable inside the config, so in case people find this unnecessary they don't have to use it.

While most of the login part is performed on the main thread afterwards, the hashing is done in another thread. That's because the hashing was the main cause of the lags and the login sequence after working out the hash needs to use the PocketMine-MP API.

Login is implemented and is ready for testing. Register still needs to be worked on.

DaPigGuy commented 7 years ago

Has this been tested?

SalmonDE commented 7 years ago

Roughly. Using the correct password let me log into my account. Using a false password told me I lost a try. Can I request testing from others?

SalmonDE commented 7 years ago

Can I turn functions I need in my async tasks to static ones so I don't need to copy them?

DaPigGuy commented 7 years ago

Nu

SalmonDE commented 7 years ago

Coding seems to be done, testing now. However, unregister, preregister and changepassword could still lag the server.

SalmonDE commented 7 years ago

Seems good so far

SalmonDE commented 7 years ago

No issues found. Green light from me.