basaran / svelte-recaptcha-v2

Google reCAPTCHA v2 implementation for Svelte SPA, SSR and sveltekit static sites.
https://basaran.github.io/svelte-recaptcha-v2/demo
MIT License
42 stars 14 forks source link

Reloads on success #15

Closed iamdimitar closed 4 months ago

iamdimitar commented 1 year ago

Every time the captcha is successful, it reloads itself.

https://github.com/basaran/svelte-recaptcha-v2/assets/1613570/6dc2bb95-9c89-43e9-8bc9-2bd0653f75ec

Same thing happens on the demo https://basaran.github.io/svelte-recaptcha-v2/demo/

Edit: Why is it resetting on success?! https://github.com/basaran/svelte-recaptcha-v2/blob/261c1a7e53d3c705e456aa781c07ecdfe2a62d37/src/Recaptcha.svelte#LL90C9-L90C61

rufus-codeb commented 11 months ago

hi, yes same issue is happening with my implementation , recaptcha is getting loaded after success , have you got any solutions ?

h1dd3nsn1p3r commented 9 months ago

Same issue here. Once reCaptcha reloads the success check is gone. Any fix?

basaran commented 4 months ago

Hello, it resets because captchas are valid only once. It's a google mechanism, next time you launch Google may choose to display the recaptcha (or not) . Usually, in production google will not ask for a second recaptcha right away.