Soenneker.Blazor.Turnstile
2.1.20
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Soenneker.Blazor.Turnstile --version 2.1.20
NuGet\Install-Package Soenneker.Blazor.Turnstile -Version 2.1.20
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="Soenneker.Blazor.Turnstile" Version="2.1.20" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.Blazor.Turnstile --version 2.1.20
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Blazor.Turnstile, 2.1.20"
#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 Soenneker.Blazor.Turnstile as a Cake Addin
#addin nuget:?package=Soenneker.Blazor.Turnstile&version=2.1.20
// Install Soenneker.Blazor.Turnstile as a Cake Tool
#tool nuget:?package=Soenneker.Blazor.Turnstile&version=2.1.20
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.Blazor.Turnstile
A Blazor interop library for Cloudflare Turnstile
This library simplifies the integration of Cloudflare Turnstile into Blazor applications, providing access to options, methods, and events. A demo project showcasing common usages is included.
Please refer to the Cloudflare documentation for further details.
Installation
dotnet add package Soenneker.Blazor.Turnstile
1. Add the following to your _Imports.razor
file
@using Soenneker.Blazor.Turnstile
2. Add the following to your Startup.cs
file
public void ConfigureServices(IServiceCollection services)
{
services.AddTurnstile();
}
3. Add this script at the bottom of the <head>
element in the wwwroot/index.html
file
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" defer></script>
4. Add this script at the bottom of the <body>
element in the wwwroot/index.html
file
<script src="_content/Soenneker.Blazor.Turnstile/turnstile.js"></script>
Usage
<Turnstile @ref="_turnstile" OnCallback="OnCallback" Options="_options" ></Turnstile>
@code{
private readonly TurnstileOptions _options = new()
{
SiteKey = "1x00000000000000000000AA" // Testing key
};
private void OnCallback(string token)
{
// Send this token to your server for validation
Logger.LogInformation("OnCallback fired, token: {token}", token);
}
}
⚠️ While 95%+ of the Cloudflare Turnstile JS has been implemented, there are a few features not yet supported. If you need assistance or want to request a new feature, please open an issue or submit a pull request.
Product | Versions 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.
-
net8.0
- Ardalis.SmartEnum.SystemTextJson (>= 8.0.0)
- Microsoft.AspNetCore.Components.Web (>= 8.0.6)
- Soenneker.Utils.Json (>= 2.1.922)
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.1.49 | 0 | 6/30/2024 |
2.1.48 | 0 | 6/30/2024 |
2.1.47 | 0 | 6/30/2024 |
2.1.46 | 0 | 6/29/2024 |
2.1.45 | 34 | 6/28/2024 |
2.1.44 | 28 | 6/28/2024 |
2.1.43 | 32 | 6/28/2024 |
2.1.42 | 30 | 6/28/2024 |
2.1.41 | 33 | 6/28/2024 |
2.1.40 | 32 | 6/27/2024 |
2.1.39 | 33 | 6/27/2024 |
2.1.38 | 33 | 6/27/2024 |
2.1.37 | 28 | 6/27/2024 |
2.1.36 | 28 | 6/27/2024 |
2.1.35 | 27 | 6/27/2024 |
2.1.34 | 32 | 6/27/2024 |
2.1.33 | 29 | 6/27/2024 |
2.1.32 | 60 | 6/24/2024 |
2.1.31 | 65 | 6/23/2024 |
2.1.30 | 62 | 6/22/2024 |
2.1.29 | 57 | 6/22/2024 |
2.1.28 | 64 | 6/22/2024 |
2.1.27 | 61 | 6/22/2024 |
2.1.26 | 62 | 6/22/2024 |
2.1.25 | 58 | 6/22/2024 |
2.1.24 | 72 | 6/16/2024 |
2.1.23 | 71 | 6/16/2024 |
2.1.22 | 72 | 6/16/2024 |
2.1.21 | 77 | 6/15/2024 |
2.1.20 | 74 | 6/15/2024 |
2.1.19 | 76 | 6/15/2024 |
2.1.18 | 70 | 6/15/2024 |
2.1.17 | 72 | 6/15/2024 |
2.1.16 | 80 | 6/15/2024 |
2.1.15 | 66 | 6/15/2024 |
2.1.14 | 72 | 6/15/2024 |
2.1.13 | 69 | 6/15/2024 |
2.1.12 | 73 | 6/15/2024 |
2.1.11 | 72 | 6/15/2024 |
2.1.10 | 68 | 6/15/2024 |
2.1.9 | 66 | 6/14/2024 |
2.1.8 | 67 | 6/14/2024 |
2.1.7 | 71 | 6/12/2024 |
2.1.6 | 68 | 6/10/2024 |
2.1.5 | 65 | 6/10/2024 |
2.1.4 | 67 | 6/9/2024 |
2.1.3 | 71 | 6/9/2024 |