Griesoft.OrchardCore.ReCaptcha 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Griesoft.OrchardCore.ReCaptcha --version 2.0.0                
NuGet\Install-Package Griesoft.OrchardCore.ReCaptcha -Version 2.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Griesoft.OrchardCore.ReCaptcha" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Griesoft.OrchardCore.ReCaptcha --version 2.0.0                
#r "nuget: Griesoft.OrchardCore.ReCaptcha, 2.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Griesoft.OrchardCore.ReCaptcha as a Cake Addin
#addin nuget:?package=Griesoft.OrchardCore.ReCaptcha&version=2.0.0

// Install Griesoft.OrchardCore.ReCaptcha as a Cake Tool
#tool nuget:?package=Griesoft.OrchardCore.ReCaptcha&version=2.0.0                

Orchard Core reCAPTCHA Module

An Orchard Core reCAPTCHA module that is based on our ASP.NET Core reCAPTCHA service.

Build Status Build Status License NuGet GitHub Release

The latest release build of this module is compatible with Orchard Core version 2.0.0.

Installation

To install, use the NuGet package manager:

PM> Install-Package Griesoft.OrchardCore.ReCaptcha

Prerequisites

The reCAPTCHA service, provided by Google, requires registration. Sign up here. For more information, refer to Google's guide.

Post-registration, you will receive a Site key and a Secret key, necessary for configuring the service in your app.

Enable the Feature

In the Admin panel, navigate to Configuration -> Features. Search for ReCaptcha and enable the module provided by us.

Configuration

Navigate to Configuration -> Settings -> ReCaptcha. Enter your Site and Secret keys acquired earlier and click save.

Hint: You can also configure the service via app settings. For more information, refer to this guide. This method also supports multi-tenancy.

Usage

The module includes parts for each reCAPTCHA challenge type (Invisible, V2, V3) that you can attach to your content types. Additionally, it provides widgets, which are particularly useful with the OrchardCore.Forms module.

Ensure the part or widget is rendered inside the <form> element. Depending on the reCAPTCHA type, it may render a submit button for your form, initiating the challenge and submitting the form upon successful completion.

You can customize the post-challenge behavior by specifying a custom JS callback function. In this case, ensure to submit your form within this callback.

Placing the challenge outside a form is possible, but you must ensure the challenge token from reCAPTCHA is included in the form submission. This can be done in three ways:

  • As a value in the form request header named G-Recaptcha-Response
  • As an input within the form named g-recaptcha-response
  • As a query parameter in the form request named g-recaptcha-response

For customizing part or widget templates and accessing tag helpers, add the following to your _ViewImports.cshtml:

@using Griesoft.OrchardCore.ReCaptcha
@addTagHelper *, Griesoft.OrchardCore.ReCaptcha

Validation

This module includes validation tasks for workflows to validate incoming HTTP requests.

For validating requests in code (e.g., in controllers or actions), use the validation attributes from the base package. Refer to the base repository instructions. Importantly, use the Griesoft.AspNetCore.ReCaptcha namespace for accessing the ValidateRecaptcha attribute and related validation logic and services.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.1 77 12/18/2024
2.0.0 169 9/21/2024
1.0.0 471 1/24/2024
0.8.8 711 10/13/2022
0.8.7 532 8/18/2022
0.8.6 443 8/14/2022
0.8.5 460 8/14/2022
0.8.4 465 8/14/2022
0.8.3 533 6/14/2022
0.8.2 563 5/2/2022
0.8.1 522 5/1/2022
0.8.0 513 5/1/2022