forceLogin now doesn't skip 2FA system

This commit is contained in:
JotaDevMC 2020-05-09 18:46:05 +02:00
parent 3c9b1077f2
commit 2c9f371595
1 changed files with 7 additions and 1 deletions

View File

@ -114,7 +114,13 @@ public class AsynchronousLogin implements AsynchronousProcess {
public void forceLogin(Player player) {
PlayerAuth auth = getPlayerAuth(player);
if (auth != null) {
performLogin(player, auth);
if (auth.getTotpKey() != null) {
limboService.resetMessageTask(player, LimboMessageType.TOTP_CODE);
limboService.getLimboPlayer(player.getName()).setState(LimboPlayerState.TOTP_REQUIRED);
// TODO #1141: Check if we should check limbo state before processing password
} else {
performLogin(player, auth);
}
}
}