prometee / sylius-google-recaptcha-v3-plugin
Plugin adding the Google reCAPTCHA v3 field to some frontend FormType of Sylius
Installs: 9 819
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 1
Open Issues: 0
Type:sylius-plugin
Requires
- karser/karser-recaptcha3-bundle: ^0.1.3
- sylius/sylius: ^1.4
Requires (Dev)
- ext-json: *
- behat/behat: ^3.7
- behat/mink: ^1.9
- dmore/behat-chrome-extension: ^1.4
- dmore/chrome-mink-driver: ^2.8
- friends-of-behat/mink: ^1.9
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-debug-extension: ^2.0
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- phpspec/phpspec: ^7.0
- phpstan/extension-installer: ^1.2
- phpstan/phpstan-doctrine: ^1
- phpstan/phpstan-strict-rules: ^1
- phpstan/phpstan-webmozart-assert: ^1
- phpunit/phpunit: ^9.5
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- sylius-labs/coding-standard: ^4.0
- symfony/browser-kit: ^5.4|^6.0
- symfony/debug-bundle: ^5.4|^6.0
- symfony/dotenv: ^5.4|^6.0
- symfony/http-client: ^5.4|^6.0
- symfony/intl: ^5.4|^6.0
- symfony/runtime: ^5.4|^6.0
- symfony/web-profiler-bundle: ^5.4|^6.0
- symfony/webpack-encore-bundle: ^1.16
- vimeo/psalm: ^4|^5
This package is auto-updated.
Last update: 2024-10-18 19:47:26 UTC
README
Sylius Plugin adding Google Recaptcha V3 integration
This plugin is adding Google Recaptcha V3 to the following forms :
- Contact form
- Registration form
But an abstract class is available to add the captcha field to any other Form\Extension
Installation
composer require prometee/sylius-google-recaptcha-v3-plugin
Configuration
Enable this plugin :
<?php # config/bundles.php return [ // ... Prometee\SyliusGoogleRecaptchaV3Plugin\PrometeeSyliusGoogleRecaptchaV3Plugin::class => ['all' => true], // ... ];
This plugin is using the karser/karser-recaptcha3-bundle
to handle the validation of the
Google Recaptcha V3, so a little configuration have to be made.
Add or modify the karser/karser-recaptcha3-bundle
configuration :
# config/packages/karser_recaptcha3.yaml karser_recaptcha3: host: 'www.recaptcha.net' # in case 'www.google.com' is not accessible (from China for example) site_key: '%env(GOOGLE_RECAPTCHA_SITE_KEY)%' secret_key: '%env(GOOGLE_RECAPTCHA_SECRET)%' score_threshold: 0.5
Finally add your site key and secret to your .env.local
file :
###> google/recaptcha ### GOOGLE_RECAPTCHA_SITE_KEY=my_site_key GOOGLE_RECAPTCHA_SECRET=my_secret ###< google/recaptcha ###