PHPackages                             friendsoforo/oro-recaptcha-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. friendsoforo/oro-recaptcha-bundle

ActiveProject[Security](/categories/security)

friendsoforo/oro-recaptcha-bundle
=================================

Oro Bundle to inject ReCAPTCHA into public forms

v6.0.0(1y ago)723.2k↓100%4[1 issues](https://github.com/FriendsOfOro/OroRecaptchaBundle/issues)MITPHP

Since Jun 18Pushed 1y ago10 watchersCompare

[ Source](https://github.com/FriendsOfOro/OroRecaptchaBundle)[ Packagist](https://packagist.org/packages/friendsoforo/oro-recaptcha-bundle)[ RSS](/packages/friendsoforo-oro-recaptcha-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (15)Used By (0)

Oro ReCAPTCHA Bundle
====================

[](#oro-recaptcha-bundle)

This bundle adds [Google ReCAPTCHA](https://developers.google.com/recaptcha/) protection for various Oro features.

Features which can currently be protected are:

- Registration Form
- Contact Us Form

Extends the Symfony [EWZRecaptchaBundle by excelwebzone](https://github.com/excelwebzone/EWZRecaptchaBundle)

Requirements
------------

[](#requirements)

This bundle supports the following Oro Platform versions:

- Oro Platform v3.x

    - Support for this version is on the "v3.x" branch
- Oro Platform v4.1.x

    - Support for this version is on the "v4.1.x" branch
- Oro Platform v4.2.x

    - Support for this version is on the "v4.2.x" branch
- Oro Platform v5.x

    - Support for this version is on the "v5.x" branch
- Oro Platform v6.0.x

    - Support for this version is on the "v6.0.x" branch

The Master branch will always track support for the latest released Oro Platform version.

Installation and Usage
----------------------

[](#installation-and-usage)

**NOTE: Adjust instructions as needed for your local environment**

1. Install via Composer: ```
    composer require friendsoforo/oro-recaptcha-bundle
    ```
2. Update your config.yml: ```
    # app/config/config.yml

    ewz_recaptcha:
        public_key:  here_is_your_public_key
        private_key: here_is_your_private_key

        # Not needed as "%kernel.default_locale%" is the default value for the locale key
        # locale_key:  %kernel.default_locale%

        # etc. Refer to the ewz_recaptcha package for more information.
    ```
3. Purge Oro cache: ```
    php bin/console cache:clear --env=prod
    ```
4. Login to Oro Admin
5. Navigate to **System Configuration =&gt; Integrations =&gt; ReCAPTCHA**
6. Configure the ReCAPTCHA widget and enabled/disable Protected Features
7. Save the configuration and verify that it is now appearing on the frontend website

Testing in Development
----------------------

[](#testing-in-development)

Copy the `config.yml` values into `config_dev.yml` and replace the public/private keys with the test keys provided by Google:

The widget should render on the forms, but will be overlaid with the text:

*"This reCAPTCHA is for testing purposes only. Please report to the site admin if you are seeing this. "*

Adding to new Form Types
------------------------

[](#adding-to-new-form-types)

1. Create a new Form Type Extension which extends `HackOro\RecaptchaBundle\Form\Extension\AbstractRecaptchaTypeExtension````
