Comments (7)
I will post various scenarios below:
- User solved recaptcha, then recaptcha expires. Expected result: there is a
(resolved)
event - User did not solve recaptcha, then recaptcha expires. Expected result: there is no
(resolved)
event
Can you clarify which of the cases does not work, please? Just so you know, it's not the lib who controls whether we reset the captcha after expiration - it's the recaptcha itself that gets reset. So you cannot avoid automatic captcha reset after it has expired.
from ng-recaptcha.
In my specific scenario, I solved the recaptcha, then sat around and waited for it to expire - so the first scenario. I have not tested the second scenario (and actually, I didn't even realize an unsolved recaptcha could expire).
Regarding your statement "it's the recaptcha itself that gets reset" - you are absolutely correct, however when this happens it shows the following text within the widget: "Verification expired. Check the checkbox again."; this is kind of nice as it provides a bit of feedback to the user as to why the recaptcha was reset. Conversely, calling the reset() method exposed by the component completely resets the recaptcha, and this info message is lost.
from ng-recaptcha.
So the real issue here is that "Verification expired. Check the checkbox again." message is lost, am I getting this right?
from ng-recaptcha.
With regards to my second scenario - yeah, that's probably not what's happening, something must have messed up my mind
from ng-recaptcha.
No - that's just a nicety - the real issue is that the response event is never fired, which means i don't know that the recaptcha is no longer valid.
So take this sample code for instance:
resolved(recaptchaResponse: string) {
this.criteria.recaptchaResponse = recaptchaResponse;
}
So when I first solve the recaptcha, my criteria object gets the big long recaptcha data string. When I sit around for a bit, the recaptcha expires, but the resolved() event is not fired, so I'm not being notified that I need to clear out that value from my criteria object.
From my investigation, its not being fired because the following code
this.grecaptcha.getResponse(this.widget)
within the reset() method is returning an empty string
from ng-recaptcha.
please update to v1.5.3
from ng-recaptcha.
Works like a charm!
from ng-recaptcha.
Related Issues (20)
- ng-recaptcha _502-gateway issue HOT 1
- Angular v16 support HOT 10
- Getting accessibility issue using JAWS screen reader when using recaptcha v2 sitekey HOT 6
- There is no way to know if a user pressed escape on the puzzle HOT 1
- What is the recommended way to load recaptcha when site key comes from back-end HOT 4
- Invalid site key or not loaded in api.js HOT 2
- Invisible using overloaded submit loses token and doesn't recover HOT 3
- Help!!!
- No way to make v3 invisible HOT 2
- Add support for Trusted Types HOT 1
- Cannot vertically scroll images in recaptcha on mobile popup HOT 1
- Can't bind to 'siteKey' since it isn't a known property of 're-captcha' HOT 3
- Feature Request Support for WAF HOT 1
- Standard Angular Standalone app giving NullInjectionError: R3InjectorError error HOT 2
- Upgrade to Angular 17? HOT 6
- Angular v17 Support HOT 1
- How to handle errors on older Angular and ng-recaptcha versions
- Issue with Recaptcha Loading
- Chrome Issue: recaptcha Reading cookie in cross-site context will be blocked in future Chrome versions
- Angular 18 Support HOT 9
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 ng-recaptcha.