fjcaetano / ReCaptcha

[In]visible ReCaptcha v2 for iOS
http://blog.flaviocaetano.com/post/recaptcha-reaches-1-dot-0/
MIT License
267 stars 133 forks source link

Didn't get callback from Validate() if there is no token #87

Closed Adhith11 closed 4 years ago

Adhith11 commented 4 years ago

Hi Flávio Caetano,

We are using reCaptcha invisible v2 in one of our iOS application which is built with swift 5. I had integrated version 1.5.0 with cocoapods.

My Issue is that, At times I don't get call back from reCaptcha in validate() function. This occurs only when the tokens are not retrieved from reCaptcha

I'm not sure why tokens are not retrieved.

Can you help me with this.

Thanks in advance.

Adhith11 commented 4 years ago

@fjcaetano Can you help me resolving this issue

fjcaetano commented 4 years ago

Hi @Adhith11, I need a bit more info than that to try and figure out what might be going on.

For starters, has the library ever worked? Were you able to retrieve a token, at least once? Were you able to show the challenge so the user can fill the question?

Adhith11 commented 4 years ago

Thanks for responding @fjcaetano

The first point is, we are able to retrieve the token most of the time we attempt, but at some case token is not retrieved. When it is not retrieved, it will not retrieve continuously for a long time.

The second point is that we use invisible challenge so there is no need for the user to verify.

Hope you are clear with the issue now.

fjcaetano commented 4 years ago

It seems there's some misunderstanding on how the invisible challenge works. I advise you to please read Google's documentation thoroughly. If the recaptcha algorithm deems the user not to be a real person then the challenge needs to be shown.

Your issue seems to be because you're either not calling configureWebView or improperly configuring the webview to be displayed.

I'm closing the issue because it doesn't seem to be anything related to the library itself, but feel free to reopen if you think it's a bug and comment any further questions you might have.

fjcaetano commented 4 years ago

From the ReCAPTCHA docs:

The invisible reCAPTCHA badge does not require the user to click on a checkbox, instead it is invoked directly when the user clicks on an existing button on your site or can be invoked via a JavaScript API call (...) By default only the most suspicious traffic will be prompted to solve a captcha

https://developers.google.com/recaptcha/docs/versions