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
hiding recaptcha webview after completing the challenge? #13
Comments
Hi @ebeem, thanks for your support. The webview won't be removed after completion. It's up to you to hide it or to remove it from the superview. |
thanks for you quick response @fjcaetano my use case has multiple actions that can be performed in the same view controller, some of these action require showing the
but no matter what approach I follow, the first attempt of the recaptcha is always successful, shows the recaptcha as expected and sometimes even pass it immediately (invisible recaptcha). However, the second attempt always shows the recaptchaView empty with no webview or recaptcha. Could you please show me what's wrong with my approach? thanks for your time. |
I think the library is not cleaned up after use, which means you wouldn't be able to call it twice, since the form has already been sent. Why do you need to call it twice anyway? If that's really necessary, I think the best way would be to instantiate a new ReCaptcha object. |
@fjcaetano thanks for your reply thanks for your help |
No problem. Let me know about your findings |
@fjcaetano until now, everything seems to be working perfectly as long as this approach is followed on initialization, declaring the variable I have a
re-initializing the recaptcha before every action instead of at the end of each causes crashes sometimes, probably the recaptcha isn't complete by that time, and thus, a javascript exception occurs. thanks for your help and the amazing library @fjcaetano , I will close this |
Reseting the stored Is the crash you're receiving an exception thrown by the library? Feel free to open another issue with it if you think it's worth it. |
it looked exactly just like issue #7
sadly, the guy who open issue #7 did not provide full code to conclude whether his issue was caused because of late initialization of the recaptcha or not also, the line that cases the exception is |
Since that's a JS error, it is expected for it to break on Nonetheless, there are verifications to start validation only after the requests have finished (since the lib is actually loading the ReCaptcha scripts), but it seems there may be some bug in that verification, since it doesn't fail when the gap between initialisation and validation is longer. I may look further into this. Just to be sure, the lib is currently working for you, right? |
yup, it works perfectly and totally satisfies my use case |
I am having some problems figuring out how can I hide the
webview
after displaying the challenge, my code isafter completing the challenge, the puzzle itself disappears, but a blank white screen is all that's left, do I have to hide the
webview
somehow after completing the challenge?thanks for the great effort you put in this library
The text was updated successfully, but these errors were encountered: