private Event routeToEmailRegistrationFlow(final Principal principal, final Authentication authentication,
                                               final Map<TokenSharingStrategyOptions, List<String>> allRecipients) {
        if (properties.getMail().isRegistrationEnabled()) {
            LOGGER.debug("No recipients found for [{}]", principal.getId());
            val eventAttributes = new LocalAttributeMap<>(CollectionUtils.wrap(
                "principal", principal,
                "authentication", authentication)
            );
            val emailRecipients = allRecipients.get(TokenSharingStrategyOptions.EMAIL);
            if (emailRecipients == null || emailRecipients.isEmpty()) {
                LOGGER.debug("No email recipients found for [{}]", principal.getId());
                eventAttributes.put(EVENT_ATTR_ALLOW_REGISTER_EMAIL, Boolean.TRUE);
            }
            return getEventFactorySupport().event(this, CasWebflowConstants.TRANSITION_ID_REGISTER, eventAttributes);
        }

        LOGGER.warn("Email registration is not enabled for [{}]", principal.getId());
        return routeToErrorEvent();
    }
Event attribute to allow registration of email.
support/cas-server-support-simple-mfa-core/src/main/java/org/apereo/cas/mfa/simple/web/flow/CasSimpleMultifactorSendTokenAction.java