keycloak-2fa-email-authenticator
keycloak-2fa-email-authenticator copied to clipboard
set error on field emailCode instead of global
This sets a field in the challenge method, enabling the template to check for errors in input emailCode
. Without this change, the error message was not appearing in the template, called by this code:
<#if messagesPerField.existsError('emailCode')>
<span id="input-error-otp-code" class="${properties.kcInputErrorMessageClass!}"
aria-live="polite">
${kcSanitize(messagesPerField.get('emailCode'))?no_esc}
</span>
</#if>