locked
integrate with Google's reCaptcha

    Question

  • I am facing an issue while trying to integrate Google's reCaptcha with WebView, the reCaptcha widget is not displayed on WebView as desired but it displays properly on iOS and Android platforms. Appreciate if someone can show the light on this
    Wednesday, January 14, 2015 7:10 AM

All replies

  • What exactly is happening? Can you show example code?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, January 14, 2015 3:14 PM
    Moderator
  • Matt,

    Here is the sample HTML, I don't find how to attach xap file here, following HTML works fine on IE browser on device but doesn't work on WebView when you wrap HTML file as native app using Sencha Touch for example

    HTML sample code: 

    <html>
      <head>
        <title>reCAPTCHA demo: Explicit render after an onload callback</title>
        <script type="text/javascript">
          var onloadCallback = function() {
            grecaptcha.render('html_element', {
              'sitekey' : 'your_site_key'
            });
          };
        </script>
      </head>
      <body>
        <form action="?" method="POST">
          <div id="html_element"></div>
          <br>
          <input type="submit" value="Submit">
        </form>
        <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
      </body>
    </html>

    Tuesday, January 20, 2015 12:01 PM
  • I can reproduce the problem.  Try the code here  under the heading "Can reCAPTCHA support users that don't have JavaScript enabled?".  It seemed to work on the phone.  Let me know how it goes.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, January 21, 2015 6:24 PM
    Moderator
  • Matt, appreciate your help.

    The app on device displays the reCaptcha widget but that widget is different than usually reCaptcha displays, displayed widget required something like copy and paste the text. I would like to render similar widget that displays generally on browser.

    Wednesday, January 28, 2015 9:24 AM