You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

BlazorCaptcha

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

BlazorCaptcha

Generates a captcha image for a Blazor Server or WebAssembly application. For use with .NET 7.0 or higher Blazor applications

2.0.2
Source
nugetNuGet
Version published
Maintainers
1
Created
Source

Blazor-Captcha

NuGet BlazorCaptcha Nuget Package

Generates a captcha image for a Blazor Server or Webassembly application.

Live demo

Blazor webassembly : https://tossnet.github.io/Blazor-Captcha/

Blazor Captcha

Installation

To Install

Install-Package BlazorCaptcha

or

dotnet add package BlazorCaptcha

For client-side and server-side Blazor - add script section to _Host.cshtml (head section)

<link href="_content/BlazorCaptcha/captcha.css" rel="stylesheet" />

Usage

@page "/"
@using BlazorCaptcha

<h3>Hello, world!</h3>


<Captcha @bind-CaptchaWord="@Captcha" CharNumber="@CaptchaLetters" />

<p>@Captcha</p>

@code{
    private string Captcha = "";
    private int CaptchaLetters = 5;

    protected override Task OnInitializedAsync()
    {
        Captcha = BlazorCaptcha.Tools.GetCaptchaWord(CaptchaLetters);

        return base.OnInitializedAsync();
    }
}

Release Notes

Version 2.0.0
  • .NET 7 compatibility removed
Version 1.7.1
Version 1.6.0
  • issue #12
Version 1.5.0
  • Add DotNet 8.0 framework target
Version 1.4.2
  • Update nuget packages
Version 1.4.1
  • To avoid any confusion, remove 'x', 'V', 'v' chars
Version 1.4.0
  • issue #10 Characters did not always fit inside the div
  • remove 'X' and '+' chars
Version 1.3.0
  • migrate to .NET 7
Version 1.2.4
  • minor improvement
Version 1.2.3
  • Add type="button"
Version 1.2.2
  • add nuget package SkiaSharp.NativeAssets.Linux
Version 1.2.0
  • NET6, removal of the bootstrap class

⚠️ Breaking changes ⚠️

Version 1.0.1 to 1.1.0
  • Change the parameter "CaptchaWord" => "@bind-CaptchaWord"
  • Add the parameter with the length of the word ex : "CharNumber="@CaptchaLetters"
  • Remove the "OnRefresh" parameter

Keywords

Blazor

FAQs

Package last updated on 08 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts