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: 27 days ago
JSON representation
Generates a captcha image for a Blazor application
- Host: GitHub
- URL: https://github.com/tossnet/blazor-captcha
- Owner: tossnet
- License: gpl-3.0
- Created: 2020-06-05T16:08:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-17T16:58:13.000Z (5 months ago)
- Last Synced: 2025-03-29T08:04:53.250Z (about 1 month ago)
- Topics: aspnetcore, blazor, blazor-application, blazor-component, blazor-server, blazor-server-app, blazor-webassembly, captcha, captcha-image, csharp, nuget, skiasharp
- Language: C#
- Homepage:
- Size: 477 KB
- Stars: 38
- Watchers: 2
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blazor-Captcha
[](https://www.nuget.org/packages/BlazorCaptcha/) Generates a captcha image for a Blazor Server or Webassembly application.
## Live demo
Blazor webassembly : https://tossnet.github.io/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)```html
```
## Usage
```html
@page "/"
@using BlazorCaptchaHello, world!
@Captcha
@code{
private string Captcha = "";
private int CaptchaLetters = 5;protected override Task OnInitializedAsync()
{
Captcha = BlazorCaptcha.Tools.GetCaptchaWord(CaptchaLetters);return base.OnInitializedAsync();
}
}
```Version 2.0.0
>- Due to the Skiasharp problem : https://github.com/mono/SkiaSharp/discussions/3185#discussioncomment-12410708,a special component for Blazor WebAssembly has been created.>- .NET 7 compatibility removed
Version 1.7.1
>- https://github.com/tossnet/Blazor-Captcha/issues/20#issuecomment-2549029344Version 1.6.0
>- issue #12Version 1.5.0
>- Add DotNet 8.0 framework targetVersion 1.4.2
>- Update nuget packagesVersion 1.4.1
>- To avoid any confusion, remove 'x', 'V', 'v' charsVersion 1.4.0
>- issue #10 Characters did not always fit inside the div
>- remove 'X' and '+' charsVersion 1.3.0
>- migrate to .NET 7Version 1.2.4
>- minor improvementVersion 1.2.3
>- Add type="button"Version 1.2.2
>- add nuget package SkiaSharp.NativeAssets.LinuxVersion 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