honey icon indicating copy to clipboard operation
honey copied to clipboard

issue with livewire and turbolink

Open sxshateri opened this issue 3 years ago • 1 comments

for some reason which i could not figure out, there is a bug using this package alongside turbolinks and livewire. if you have an action that needs ReCaptcha/honey verification it works the first time but if you intend to do it again you HAVE to refresh the page to get the new token or else the verification fails. not refreshing the page is the whole point of SPA and turbolinks. not sure what could be the issue since im not a javascript guru but i guess it might be because there is no data-turbolinks-track="true" for the ReCaptcha script. any idea what is causing this issue and how to fix it?

sxshateri avatar Oct 17 '21 12:10 sxshateri

You may need to tear down something in the ReCaptcha script?

document.addEventListener('turbolinks:before-cache', () => { // do whatever needs to be done to remove the recaptcha from the page } });

kyranb avatar Mar 24 '22 06:03 kyranb