feat: add two-factor authentication support to login #1465
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.




This pull request introduces multi-server configuration support and implements two-factor authentication (2FA) for login, along with improvements to account credential management and error handling. The most important changes are grouped below.
Multi-server configuration and management:
Servers_initconfiguration system ininit.lua, allowing clients to easily switch between multiple servers and worlds from a single installation. This includes anENABLE_SERVERSflag to enable/disable the entire configuration block and per-server settings such as port, protocol, and authentication options. (init.luainit.luaL12-R84)Two-factor authentication (2FA) integration:
authenticatortoken.otui), and added logic to prompt users for a token when required, including error handling for incorrect tokens. (authenticatortoken.otui[1]entergame.lua[2] [3] [4]meta.lua[1]entergame.lua[2] [3]Account credential management improvements:
ServerListmodule. The UI updates automatically based on stored credentials, and the "Remember Email" checkbox is now server-specific. (entergame.lua[1] [2] [3] [4] [5] [6]safeDecrypthelper to robustly handle decryption failures when loading credentials. (entergame.luamodules/client_entergame/entergame.luaR3-R7)UI and error handling enhancements:
entergame.lua[1] [2]entergame.lua[1] [2]Server list and autologin support:
entergame.lua[1] [2]