Comments (10)
@shelland Thank you!
I have this problem too. I use Razor Pages.
It helps me::
@(Html.Recaptcha(RecaptchaSettings.Value, new RecaptchaV3HiddenInput { IsAsync = false }))
from recaptcha.aspnetcore.
Seems like I could found a reason of this issue:
grecaptcha.ready is not being called because main JS file is loaded using "async defer". Recaptcha documentation says that you should embed JS script in the following way:
<script src="https://www.google.com/recaptcha/api.js?render=reCAPTCHA_site_key"></script>
without "async defer" attributes. In this case everything works correctly. Currently JS file is linked with the following code:
<script src="https://www.google.com/recaptcha/api.js?render=SOME_KEY&hl=en" async defer></script>from recaptcha.aspnetcore.
Added a link to the bottom of readme for this issue, and other special cases.
from recaptcha.aspnetcore.
perhaps unnecessarily but V3HiddenInput is in the 'versions' namespace and not in the 'templates' namespace
from recaptcha.aspnetcore.
Hi, i guess please make sure you are using the updated version of the package for 3.1. Other wise if you have already done this, you would need more information about how you are using it. V3Invis should have a logo on the right hand corner of the page (recaptcha logo) if you don't see that check the console in you browser for errors. Normally an empty response on happens if the page sits for too long.
If you are still having issues please post more examples of how your using (just a small block of code around the @html tag etc.. hopefully others can help as well.
from recaptcha.aspnetcore.
I'm using the latest version of the package. The recaptcha logo is also at the buttom of the page.
Here is a small code sample
<div class="form-group">
<div class="column" style="direction: rtl;">
@(Html.Recaptcha<RecaptchaV3HiddenInput>(RecaptchaSettings.Value))
</div>
</div>
This code is inside a form.
from recaptcha.aspnetcore.
@TimothyMeadows I'm also using the latest NuGet package and I can confirm that something went wrong. g-recaptcha-response is also empty. It worked correctly some time ago. All configuration entries are okay, serviceCollection.AddRecaptcha(...) method call exists. In razor view: @(Html.Recaptcha(recaptchaSettings?.Value))
from recaptcha.aspnetcore.
The solution above needs moving to the homepage so others aren't wasting time over this.
from recaptcha.aspnetcore.
This is likely to not occur, i can't document every special use case in the README. However, this can be linked to for future users that might run into the issue. IsAsync exists for a reason.
from recaptcha.aspnetcore.
This is likely to not occur, i can't document every special use case in the README. However, this can be linked to for future users that might run into the issue. IsAsync exists for a reason.
My page is a bog standard MVC Razor page, not exactly a special case
from recaptcha.aspnetcore.
Related Issues (20)
- v3 Recaptcha is timing out after 120 seconds and cannot be used anymore
- NotSupportedException: Deserialization of reference types without parameterless constructor is not supported. Type 'reCAPTCHA.AspNetCore.RecaptchaResponse'
- Reusable filters should not use transient DI
- Incorrect Content-Type: application/json; HOT 1
- AddRecaptcha method should be inside Microsoft.Extensions.DependencyInjection HOT 4
- Cannot localize the error message HOT 2
- Using it in Ajax form, unvalid modelstate HOT 1
- Implementation on Razor Pages HOT 1
- Recaptcha score configurable from appsettings HOT 1
- Problem with Razor Pages HOT 1
- Validation is failing after upgrading asp.net core project from v2.2 to 3.1 HOT 3
- Validation is failing constantly HOT 2
- Recaptcha in controller of web api HOT 1
- Prevent Exception when recaptcha isn't at form
- Cannot validate recaptcha in cloud app behind Azure app gateway HOT 2
- [Q]: Can you render a full challenge in V3 if user fails the score? HOT 2
- CSP can't be really used HOT 1
- Usage with .Net Framework 4.8
- Cannot submit with "submit JS script" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recaptcha.aspnetcore.