react-recaptcha icon indicating copy to clipboard operation
react-recaptcha copied to clipboard

verifyCallback callback isn't being called the first time you make the request.

Open anmol5varma opened this issue 7 years ago • 4 comments

A weird behaviour is happening as the first time I use captcha the callback isn't being called and hence no gResponse is sent and login fails. From the second request onwards it works fine.

anmol5varma avatar Jun 08 '18 11:06 anmol5varma

I've also had many problems with this lib so I've created my own one. You can check it out, it works pretty well and has some cool improvements comparing to this one. If you'll lack anything there, just file an issue - I'll try to fix it as soon as possible. 🚀

Library: https://github.com/sarneeh/reaptcha Example: https://sarneeh.github.io/reaptcha/

jsardev avatar Jun 13 '18 20:06 jsardev

It only works with explicity rendering, you need to specify

...
render="explicit"
onloadCallback={() => console.log('rendered')}
...

Not making excuses, putting here to help others.

Library needs better documentation!

mattlockyer avatar Feb 06 '19 15:02 mattlockyer

onloadCallback maybe works, but I still have issues with verifyCallback even with explicit render option.

ElForastero avatar Aug 12 '19 09:08 ElForastero

just having explicit render option is not enough -- you need the onloadCallback defined

...
render="explicit" // 
onloadCallback={() => console.log('rendered')} // required
verifyCallback={(response) => { // do something }}
...

murtali avatar Oct 10 '19 19:10 murtali