PHPackages                             boxtwentytwo/module-cloudflare-turnstile - 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. boxtwentytwo/module-cloudflare-turnstile

ActiveMagento2-module

boxtwentytwo/module-cloudflare-turnstile
========================================

Adds Cloudflare Turnstile support to Magento 2

1.0.0(11mo ago)11289↓100%4GPL-3.0-or-laterPHPPHP ~8.2.0||~8.3.0||~8.4.0

Since Jun 5Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/boxtwentytwo/m2-cloudflare-turnstile)[ Packagist](https://packagist.org/packages/boxtwentytwo/module-cloudflare-turnstile)[ RSS](/packages/boxtwentytwo-module-cloudflare-turnstile/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

Cloudflare Turnstile for Magento 2
==================================

[](#cloudflare-turnstile-for-magento-2)

[![Hyvä Compatible](https://camo.githubusercontent.com/55e0cec279138050363bee12888aa11c2778fd3449148168b5c7303af85cc905/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4879762543332541342d436f6d70617469626c652d3041313434423f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d304132334239)](https://camo.githubusercontent.com/55e0cec279138050363bee12888aa11c2778fd3449148168b5c7303af85cc905/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4879762543332541342d436f6d70617469626c652d3041313434423f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d304132334239)

A module for Magento 2 that extends the built-in reCAPTCHA support to add [Cloudflare Turnstile](https://www.cloudflare.com/en-gb/application-services/products/turnstile/ "Cloudflare Turnstile"), an alternative privacy-friendly solution.

The documentation for Cloudflare Turnstile can be found [here](https://developers.cloudflare.com/turnstile/ "here").

Features
--------

[](#features)

- Supports Luma and Hyvä storefronts
- Configurable widget size, theme (light/dark), and language
- Works in all the places Magento's reCAPTCHA solution does, including:
    - Customer login form
    - Forgotten password form
    - New customer account form
    - Contact us form
    - Product review forms
    - Newsletter subscription form
    - Checkout
    - Admin login form
    - Admin forgotten password form

Installation
------------

[](#installation)

```
composer require boxtwentytwo/module-cloudflare-turnstile
bin/magento module:enable BoxTwentyTwo_CloudflareTurnstile
bin/magento setup:upgrade

```

Usage
-----

[](#usage)

### Configuration

[](#configuration)

Create a Cloudflare Turnstile site and secret key by following the instructions in the [Cloudflare Turnstile documentation](https://developers.cloudflare.com/turnstile/get-started/ "Cloudflare Turnstile documentation").

Keys can be configured in the Magento admin panel, in the same places as the built-in reCAPTCHA configuration:

- **Stores &gt; Configuration &gt; Security &gt; Google reCAPTCHA Admin Panel &gt; Cloudflare Turnstile**
- **Stores &gt; Configuration &gt; Security &gt; Google reCAPTCHA Storefront &gt; Cloudflare Turnstile**

### Activation per form

[](#activation-per-form)

Activate Cloudflare Turnstile on the desired forms in the same places as Magento's reCAPTCHA configuration:

- **Stores &gt; Configuration &gt; Security &gt; Google reCAPTCHA Admin Panel &gt; Storefront**
- **Stores &gt; Configuration &gt; Security &gt; Google reCAPTCHA Storefront &gt; Storefront**

Testing
-------

[](#testing)

Cloudflare Turnstile provides test keys that can be used to test the integration in a predictable manner. You can find the test keys in the [Cloudflare Turnstile documentation](https://developers.cloudflare.com/turnstile/troubleshooting/testing/#test-sitekeys "Cloudflare Turnstile documentation").

Troubleshooting
---------------

[](#troubleshooting)

### Hyvä

[](#hyvä)

In some cases, custom themes may override the display of the Turnstile widget. If, after activation from the admin panel, the widget does not appear on the forms, please check your theme's templates to ensure the widget is being called for.

For the contact form, as an example, make sure the following lines are present in the template:

```
