Error with Ajax
josuelmm opened this issue · 3 comments
Every time a request is sent using ajax, and there is an error, just let it do it once, you have to reload the page to be able to use it again, because it returns the catpcha error. It should have a function to refresh the captcha.
I made a login where it returns if the person has active, double authentication, so if it returns yes, it should ask for the code on the same page, but it doesn't stop because if it sends the code at once, it should refresh.
Environment:
- OS and server: Ubuntu/Windows
- PHP version [7.3.11]
- Laravel version [7.29.3]
Hi @josuelmm , could you provide which version of recaptcha (v2, v3, invisible) you are using
Hi @josuelmm , could you provide which version of recaptcha (v2, v3, invisible) you are using
v3, invisible. I tried both
It's hard to figure out how to handle this without taking a look at your code, but I assume you have a custom js function to handle ajax requests. Try to add grecaptcha.reset()
inside your custom callback function, it should be enough.