Sylius Security: Login-form Google reCaptcha

I’m trying to add ReCaptcha to Sylius Login Form, I have installed stefandoorn/sylius-recaptcha-plugin and followed all installation instructions, but the form it’s not validating, the form is logged even when the captcha field is empty, and no error is throwed i can’t undertand that behavior. I’m currently using Sylius v1.7

The view is working well and look like that:

I have extended SecurityLoginType and created an Extension:



namespace App\Form\Extension;

use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType;
use EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrue as RecaptchaTrue;
use Sylius\Bundle\UiBundle\Form\Type\SecurityLoginType;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\FormBuilderInterface;

class SecurityLoginTypeExtension extends AbstractTypeExtension
    public function buildForm(FormBuilderInterface $builder, array $options): void
        $builder->add('_recaptcha', EWZRecaptchaType::class, [
            'mapped' => false,
            'constraints' => [
                new RecaptchaTrue(),
            'attr' => [
                'defer' => true,
                'async' => true,

    public static function getExtendedTypes(): iterable
        return [SecurityLoginType::class];

And register the extension on config/services.yml

        class: App\Form\Extension\SecurityLoginTypeExtension
            - { name: form.type_extension, extended_type: Sylius\Bundle\UiBundle\Form\Type\SecurityLoginType }

And override the login tempate in SyliusUiBundle/Security/_login.html.twig

{% form_theme form '@EWZRecaptcha/Form/ewz_recaptcha_widget.html.twig' %}

{{ form_errors(form._recaptcha) }}
{{ form_widget(form._recaptcha, { 'attr': {
    'options' : {
        'theme': 'light',
        'type': 'image',
        'size': 'normal'
} }) }}

The EWZRecaptchaBundle Bundle is enabled and it’s working well on Contact Form and Register Form, but curiously on Login Form it didn’t work. I have tried setting the sylius as validation group but the result was the same. I think the problem could be on SecurityLoginType and the way that it’s used by the framework, because it didn’t validate any constraints.

Any suggestions about it. Thanks in advance.