I’m utilizing the Google reCaptcha in iOS and android native apps, which is working nice. However I additionally need to implement the Google ReCaptcha in MacOS app as effectively. Google ReCaptcha Enterprise dose not provide any lib or SDK for MacOS. So I used to be attempting to make use of the Google ReCaptcha in WebView in MacOS utilizing java Script code.
However I’m all the time getting the error : “ERROR for web site proprietor: Invalid area for web site key”, when loading that web page in Net view in MacOS app.
I’m utilizing under code for implementing it
<html>
<head>
<script src="https://www.google.com/recaptcha/enterprise.js?render=MY_KEY"></script>
<script>
perform onSubmit() {
grecaptcha.enterprise.prepared(perform() {
grecaptcha.enterprise.execute('MY_KEY', {motion: 'LOGIN'}).then(perform(token) {
window.webkit.messageHandlers.recaptchaCallback.postMessage(token);
});
});
}
</script>
</head>
<physique>
<button onclick="onSubmit()">Confirm</button>
</physique>
</html>
I additionally tried turning off the Area Verification from captcha key setting for the Key that I’m utilizing.
When Area Verification tuned off, this identical code labored nice after I tried in on-line html compiler in browser, however not in MacOS.
Any concept why Google ReCaptcha will not be working when loaded utilizing java script in MacOS’s webview ?
Additionally please let me know if there may be some other option to implement Google ReCaptcha in MacOS App ?
Thanks.