Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recaptcha sends double reload request #156

Closed
DanDvoracek opened this issue Feb 16, 2022 · 1 comment
Closed

recaptcha sends double reload request #156

DanDvoracek opened this issue Feb 16, 2022 · 1 comment

Comments

@DanDvoracek
Copy link

DanDvoracek commented Feb 16, 2022

Hi there,

I've been searching for a while and can't figure out what happens really.

I have a very basic frontend setup with a contact page for which I'd like to use this package.
Everything is fine with the form (method, @csrf, @captcha, etc...) and the data is indeed validated with a custom request class. Validation passes and flash message is sent accordingly. I then save the data in DB, usual stuff.

The problem is that every time I submit the form I end up with two entries in my DB for the same submission. I searched for mistakes in my code before realising that the invisible-recaptcha sends two xhr requests, which is probably why I end up with two records...

Is that the normal lifecycle ? Is there a way to avoid this behaviour ? As I said, my setup is a standard form page as you would except regarding the markup. Very standard stuff. The request class too. Nothing wrong there as data validates correctly.

Any hint would be appreciated. Thanks!

// Laravel 9 - php 8

Screenshot 2022-02-16 at 11 47 38

@brandonyoungdev
Copy link

Did you ever find a fix for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants