承接 pixelopen/magento-cloudflare-turnstile 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pixelopen/magento-cloudflare-turnstile

Composer 安装命令:

composer require pixelopen/magento-cloudflare-turnstile

包简介

Protect your store from spam messages and spam user accounts with Cloudflare Turnstile

README 文档

README

Minimum PHP Version Minimum Magento Version GitHub release

Presentation

Turnstile is Cloudflare's smart CAPTCHA alternative. The module allows Turnstile to protect your Magento OpenSource or Adobe Commerce forms.

Cloudflare Turnstile

Frontend Forms

  • Contact
  • Login
  • Register
  • Reset password
  • Review
  • Send product to friend
  • Newsletter

Admin Forms

  • Login
  • Reset password

Requirements

  • Magento >= 2.4.4
  • PHP >= 8.0

Installation

composer require pixelopen/magento-cloudflare-turnstile

Configuration

Disable all Magento Captcha

Stores > Configuration > Customers > Customer Configuration > CAPTCHA

  • Enable CAPTCHA on Storefront: no

Stores > Configuration > Security > Google reCAPTCHA Storefront > Storefront

  • Enable for Customer Login: no
  • Enable for Forgot Password: no
  • Enable for Create New Customer Account: no
  • Enable for Contact Us: no
  • Enable for Product Review: no

Stores > Configuration > Security > Google reCAPTCHA Admin Panel > Admin Panel

  • Enable for Login: no
  • Enable for Forgot Password: no

Enable Cloudflare Turnstile

Stores > Configuration > Services > Cloudflare Turnstile

Settings

  • Sitekey: the sitekey given for the site in your Cloudflare dashboard
  • Secret key: the secret key given for the site in your Cloudflare dashboard

Storefront

  • Enabled: enable Cloudflare Turnstile
  • Theme: the Turnstile theme (auto, light or dark)
  • Size: the widget size (compact, normal, or flexible)
  • Forms to validate: the frontend forms where a Turnstile validation is required

Admin Panel

  • Enabled: enable Cloudflare Turnstile
  • Theme: the Turnstile theme (auto, light or dark)
  • Size: the widget size (compact, normal, or flexible)
  • Forms to validate: the admin forms where a Turnstile validation is required

Override default config

You can specifically change theme and size values for a form in the layout:

<?xml version="1.0"?>
<!-- layout/customer_account_login.xml -->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="form.additional.info">
            <block name="pixel.open.cloudflare.turnstile.login">
                <action method="setSize">
                    <argument name="size" xsi:type="string">compact</argument>
                </action>
                <action method="setTheme">
                    <argument name="theme" xsi:type="string">dark</argument>
                </action>
            </block>
        </referenceContainer>
    </body>
</page>

Command line configuration

Settings

bin/magento config:set pixel_open_cloudflare_turnstile/settings/secret_key {secret_key}
bin/magento config:set pixel_open_cloudflare_turnstile/settings/sitekey {sitekey}

Frontend

bin/magento config:set pixel_open_cloudflare_turnstile/frontend/enabled {1|0}
bin/magento config:set pixel_open_cloudflare_turnstile/frontend/theme {auto|light|dark}
bin/magento config:set pixel_open_cloudflare_turnstile/frontend/size {normal|compact|flexible}
bin/magento config:set pixel_open_cloudflare_turnstile/frontend/forms contact,register,login,login-ajax,password

Admin

bin/magento config:set pixel_open_cloudflare_turnstile/adminhtml/enabled {1|0}
bin/magento config:set pixel_open_cloudflare_turnstile/adminhtml/theme {auto|light|dark}
bin/magento config:set pixel_open_cloudflare_turnstile/adminhtml/size {normal|compact|flexible}
bin/magento config:set pixel_open_cloudflare_turnstile/adminhtml/forms login,password

Testing

Use the following sitekeys and secret keys for testing purposes:

Sitekey

Sitekey Description
1x00000000000000000000AA Always passes
2x00000000000000000000AB Always blocks
3x00000000000000000000FF Forces an interactive challenge

Secret key

Secret key Description
1x0000000000000000000000000000000AA Always passes
2x0000000000000000000000000000000AA Always fails
3x0000000000000000000000000000000AA Yields a "token already spent" error

Definitely remove re-captcha

To remove all native re-captcha modules, add all modules in the "replace" node of the composer.json.

{
  "replace": {
    "magento/module-re-captcha-admin-ui": "*",
    "magento/module-re-captcha-checkout": "*",
    "magento/module-re-captcha-checkout-sales-rule": "*",
    "magento/module-re-captcha-contact": "*",
    "magento/module-re-captcha-customer": "*",
    "magento/module-re-captcha-frontend-ui": "*",
    "magento/module-re-captcha-gift-card": "*",
    "magento/module-re-captcha-invitation": "*",
    "magento/module-re-captcha-migration": "*",
    "magento/module-re-captcha-multiple-wishlist": "*",
    "magento/module-re-captcha-newsletter": "*",
    "magento/module-re-captcha-paypal": "*",
    "magento/module-re-captcha-review": "*",
    "magento/module-re-captcha-send-friend": "*",
    "magento/module-re-captcha-store-pickup": "*",
    "magento/module-re-captcha-ui": "*",
    "magento/module-re-captcha-user": "*",
    "magento/module-re-captcha-validation": "*",
    "magento/module-re-captcha-validation-api": "*",
    "magento/module-re-captcha-version-2-checkbox": "*",
    "magento/module-re-captcha-version-2-invisible": "*",
    "magento/module-re-captcha-version-3-invisible": "*",
    "magento/module-re-captcha-webapi-api": "*",
    "magento/module-re-captcha-webapi-graph-ql": "*",
    "magento/module-re-captcha-webapi-rest": "*",
    "magento/module-re-captcha-webapi-ui": "*"
  }
}

pixelopen/magento-cloudflare-turnstile 适用场景与选型建议

pixelopen/magento-cloudflare-turnstile 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 31.27k 次下载、GitHub Stars 达 54, 最近一次更新时间为 2022 年 11 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 pixelopen/magento-cloudflare-turnstile 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 pixelopen/magento-cloudflare-turnstile 我们能提供哪些服务?
定制开发 / 二次开发

基于 pixelopen/magento-cloudflare-turnstile 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 31.27k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 54
  • 点击次数: 24
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 54
  • Watchers: 4
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-11-07