diff --git a/Plugins/Mineplex.Core/src/mineplex/core/twofactor/TwoFactorAuth.java b/Plugins/Mineplex.Core/src/mineplex/core/twofactor/TwoFactorAuth.java index 0b768b4ab..bc46f5218 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/twofactor/TwoFactorAuth.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/twofactor/TwoFactorAuth.java @@ -27,6 +27,7 @@ import org.bukkit.map.MapRenderer; import org.bukkit.map.MapView; import com.warrenstrange.googleauth.GoogleAuthenticator; +import com.warrenstrange.googleauth.GoogleAuthenticatorConfig; import mineplex.core.Managers; import mineplex.core.MiniClientPlugin; @@ -46,7 +47,9 @@ public class TwoFactorAuth extends MiniClientPlugin private final Map setupData = new HashMap<>(); private final Set authenticating = new HashSet<>(); - private static final GoogleAuthenticator authenticator = new GoogleAuthenticator(); + private static final GoogleAuthenticator authenticator = new GoogleAuthenticator( + new GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder().setWindowSize(5).build() + ); private final CoreClientManager _clientManager = Managers.require(CoreClientManager.class); private final TwoFactorRepository _repository = new TwoFactorRepository(DBPool.getAccount());