GithubHelp home page GithubHelp logo

griesoft / aspnetcore-recaptcha Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 4.0 876 KB

A Google reCAPTCHA service for ASP.NET Core. Keep bots away from submitting forms or other actions in just a few steps.

License: MIT License

C# 100.00%
aspnetcore aspnetcore-mvc recaptcha recaptcha-v2 recaptcha-v3 recaptcha-validation

aspnetcore-recaptcha's People

Contributors

jooni91 avatar mikocot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aspnetcore-recaptcha's Issues

Support Forward Proxy

Discussed in #18

Originally posted by mikocot September 8, 2022
Hi, it's not uncommon for the servers to make use of proxys to route outcoming requests, like the one needed for recaptcha. This is also the case for our company.

I can think of a workaround for now, but in the long term it would be nice to add this feature, especially, it is quite trivial.
We'd only need to allow configuring additional values and then include them when creating an http client.
I'll submit a PR shortly.

Ajax json

Hi, first all, thanks for share your amazing work!

I tried your library with Ajax post and content-type: application/json, but, it seems the controller doesn't bind the "g-recaptcha-response" parameter. I'm using [FromBody] to binding model from request parameters, and I just don't know how to catch recaptcha parameter in the decorator. Definitively, I'm doing something wrong.

[HttpPost]
[ValidateAntiForgeryToken]
[ValidateRecaptcha(Action = "submit", ValidationFailedAction = ValidationFailedAction.ContinueRequest)]
public async Task EnviarMensaje(ViewModel prospect, ValidationResponse recaptchaResponse)

I hope I've explained my self, my English is bad.

Thanks again and have a nice day!

What do you do when the recaptcha is wrong?

Thanks for writing this package. I added it to my code and it shows up and seems to be working. However, when I submit my form without pressing "I am not a robot" the form submits anyway.. and comes back with a 404 error. There is no error on the screen to tell the user they should have checked the box before submitting.

Is there any way to customise the score/threshold for validations?

According to Google's documentation on reCaptcha v3, there is a score parameter returned with each validation. See https://developers.google.com/recaptcha/docs/v3#interpreting_the_score

By default, a 0.5 threshold can be used, but there is no place in the config pages of your plugin to tweak that value in case we want to tighten or relax validations. Only the Site Key and Secret Key values are configurable:

image

We are using Workflows and for the tasks used there, no configurable score is avalable either:

workflow

Where should we do that? Does your plugin have support for this? Are you planning to add it? Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.