Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tossnet/blazor-captcha

Generates a captcha image for a Blazor application
https://github.com/tossnet/blazor-captcha

aspnetcore blazor blazor-application blazor-component blazor-server blazor-server-app blazor-webassembly captcha captcha-image csharp nuget skiasharp

Last synced: 1 day ago
JSON representation

Generates a captcha image for a Blazor application

Awesome Lists containing this project

README

        

# Blazor-Captcha
[![NuGet](https://img.shields.io/nuget/v/BlazorCaptcha.svg)](https://www.nuget.org/packages/BlazorCaptcha/) ![BlazorCaptcha Nuget Package](https://img.shields.io/nuget/dt/BlazorCaptcha)

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

![Blazor Captcha](https://github.com/tossnet/Blazor-Captcha/blob/master/blazor-captcha.png)

# Installation
Latest version in here: [![NuGet](https://img.shields.io/nuget/v/BlazorCaptcha.svg)](https://www.nuget.org/packages/BlazorCaptcha/)

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)

```html

```

## Usage

```html
@page "/"
@using BlazorCaptcha

Hello, world!

@Captcha

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

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

return base.OnInitializedAsync();
}
}
```

## Release Notes

Version 1.7.1

>- https://github.com/tossnet/Blazor-Captcha/issues/20#issuecomment-2549029344

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