Soenneker.Blazor.Turnstile 2.1.40

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package Soenneker.Blazor.Turnstile --version 2.1.40
NuGet\Install-Package Soenneker.Blazor.Turnstile -Version 2.1.40
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.40" />
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.40
#r "nuget: Soenneker.Blazor.Turnstile, 2.1.40"
#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.40

// Install Soenneker.Blazor.Turnstile as a Cake Tool
#tool nuget:?package=Soenneker.Blazor.Turnstile&version=2.1.40

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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 Startup.cs file

public void ConfigureServices(IServiceCollection services)
{
    services.AddTurnstile();
}

Usage

@using Soenneker.Blazor.Turnstile

<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 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.1.40 0 6/27/2024
2.1.39 0 6/27/2024
2.1.38 14 6/27/2024
2.1.37 7 6/27/2024
2.1.36 20 6/27/2024
2.1.35 18 6/27/2024
2.1.34 23 6/27/2024
2.1.33 21 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 70 6/9/2024