Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Texnomic/hCaptcha
ASP.NET Core hCaptcha Component for Server-Side Blazor.
https://github.com/Texnomic/hCaptcha
blazor component-library csharp dotnet frontend hcaptcha javascript razor razor-components
Last synced: 3 months ago
JSON representation
ASP.NET Core hCaptcha Component for Server-Side Blazor.
- Host: GitHub
- URL: https://github.com/Texnomic/hCaptcha
- Owner: Texnomic
- License: mit
- Created: 2020-06-22T14:29:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-15T03:57:46.000Z (over 1 year ago)
- Last Synced: 2024-07-01T10:26:12.867Z (4 months ago)
- Topics: blazor, component-library, csharp, dotnet, frontend, hcaptcha, javascript, razor, razor-components
- Language: C#
- Homepage:
- Size: 71.3 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-blazor - Texnomic.Blazor.hCaptcha - ![last commit](https://img.shields.io/github/last-commit/Texnomic/hCaptcha?style=flat-square&cacheSeconds=86400) hCaptcha Component for Server-Side Blazor. (Libraries & Extensions / 2D/3D Rendering engines)
README
![Blazor](https://raw.githubusercontent.com/Texnomic/hCaptcha/master/Logo.png)
## Texnomic.Blazor.hCaptcha![NuGet](https://img.shields.io/nuget/vpre/Texnomic.Blazor.hCaptcha?logo=NuGet&label=NuGet%20%7C%20Texnomic.Blazor.hCaptcha&logoColor=blue&color=blue)
ASP.NET Core hCaptcha Component for Server-Side Blazor.
## Installation
```pwsh
PM> Install-Package Texnomic.Blazor.hCaptcha
```## Setup
1. Reference hCaptcha & NuGet Package JavaScript Files In `Pages/_Host.cshtml` File:
```html
```2. Add Package Configuration To Dependancy Injection Services in `Startup.cs` File:
```csharp
using Texnomic.Blazor.hCaptcha.Extensions;public void ConfigureServices(IServiceCollection Services)
{
Services.AddHttpClient();
Services.AddHCaptcha(Options =>
{
Options.SiteKey = "10000000-ffff-ffff-ffff-000000000001";
Options.Secret = "0x0000000000000000000000000000000000000000";
});
}
```3. Create Callback Function & Backing Field To Capture Captcha Result In `Example.razor.cs` File:
```csharp
private bool IsCaptchaValid { get; set; }protected void hCaptchaCallback(bool Result) => IsCaptchaValid = Result;
```4. Finally, Drop-In hCaptcha Component & Bind Callback Function In `Example.razor` File:
```html
```## Donations
* [![PayPal](https://img.shields.io/static/v1?logo=PayPal&label=PayPal&message=https://www.paypal.me/texnomic&color=blue)](https://www.paypal.me/texnomic)
* ![Bitcoin](https://img.shields.io/static/v1?logo=Bitcoin&label=BTC&message=13wMqy8yg9yhJAAP2AXu8A2De1ptAYh6s4&color=orange)
* ![Ethereum](https://img.shields.io/static/v1?logo=Ethereum&label=Ethereum&message=0xfE171b1C5C5584b65ec58a6FA2009f6ECeE812D7&color=black&logoColor=black)