public class OTPFormAuthenticator extends AbstractUsernameFormAuthenticator
Now when 'Brute force detection' under 'Security defenses' is enabled, it'll work with email 2fa. Also when a user enters wrong 2fa, the event will include which user that happened to.
I followed the example in this file https://github.com/keycloak/keycloak/blob/main/services/src/main/java/org/keycloak/authentication/authenticators/browser/OTPFormAuthenticator.java Namely
and
Now when 'Brute force detection' under 'Security defenses' is enabled, it'll work with email 2fa. Also when a user enters wrong 2fa, the event will include which user that happened to.