keycloak-2fa-email-authenticator icon indicating copy to clipboard operation
keycloak-2fa-email-authenticator copied to clipboard

set error on field emailCode instead of global

Open eitchugo opened this issue 2 months ago • 0 comments

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>

eitchugo avatar Apr 16 '24 17:04 eitchugo