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

Stopped working after updating both livewire 3 and honey #72

Open
Nevh1100 opened this issue Jun 16, 2024 · 2 comments
Open

Stopped working after updating both livewire 3 and honey #72

Nevh1100 opened this issue Jun 16, 2024 · 2 comments

Comments

@Nevh1100
Copy link

Nevh1100 commented Jun 16, 2024

Hi there!
I've been using the captcha for some time along with the honeypot and it worked with some adjustments (#71 ) but now, after updating Livewire and Honey to the latest version, it stopped working
Component:
if(!$this->honeyPasses()){ $this->storeToastData('error', "Wrong Captcha, try refreshing the page."); return $this->redirect($this->previous, true); }
Blade (inside the form):
<x-honey recaptcha="login"/>
Using honeyPasses() consistently returns false, so I tried recaptchaPasses(). I noticed it works the first time, as the recaptcha token loads correctly. However, after navigating with wire:navigate, the token is deleted, and only this remains:
<input wire:model="honeyInputs.honey_recaptcha_token" action="login" type="hidden" data-purpose="honey-rc" data-action="login" name="honey_recaptcha_token" value="">
Also after 2 minutes the recaptcha is refreshed properly (I think automatically because I modified token_refresh_interval to 30 seconds and it didn't refresh it)

Does anyone have a clue what could be causing my problem?

Thank you!

@cbaconnier
Copy link
Contributor

wire:navigate cause a lot of headache when you work with libraries that changes the DOM.
I suppose, one possible way would be to intercept the livewire:navigating event to clear the timeouts and inputs.
It would probably require a PR.

@Dave2084
Copy link

Dave2084 commented Sep 5, 2024

wire:navigate cause a lot of headache when you work with libraries that changes the DOM. I suppose, one possible way would be to intercept the livewire:navigating event to clear the timeouts and inputs. It would probably require a PR.

I'm hitting the wire:navigate issue as well, is there any way I can fix this without waiting for a PR?

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

3 participants