Sat, 16 Jan 2021 09:05:30 GMT
Join the conversation at slack.cordova.io
Fri, 15 Jan 2021 11:53:58 GMT
@terekhov says
Hello, everyone!
Can someone help me with google recaptcha on cordova hybrid project? To be precise it
s reCaptcha v3 we are using. The recaptcha script is not being attached to page. At first that was only on iOS, but, i swear to god, it was functioning on Android, so i uploaded new version to store. But it
s been 4 days and now script is not in the DOM on Android as well. I`ve been searching and trying a lot in internet, none solution works.Here is my final config.xml i`ve been trying
<access origin="https://*.google.com/*"/> <allow-navigation href="*://localhost"/> <allow-navigation href="<https://www.google.com/recaptcha/*>" /> platform=ios <preference name="Hostname" value="myapp.local" /> (cordova-plugin-ionic-webview) <allow-navigation href="<http://myapp.local/*>" /> <allow-navigation href="<https://www.google.com/recaptcha/*>" /> platform=android no specific configuration and in my google recaptcha console i have *localhost* and *myapp.local* declared Domain Check\Validation in captcha admin console in turned on as well. One of solutions i have seen is to turn it off, dont think its a good idea....```
Fri, 15 Jan 2021 16:18:01 GMT
@terekhov says
i also have added, no use
http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval; media-src *" />```
Fri, 15 Jan 2021 16:21:30 GMT
@norman137 says
Is there any specific error text that is produced? Including that may be helpful.
Fri, 15 Jan 2021 15:48:39 GMT
@werner.haingartner says
I am still stuck on the same cors problem:
if I have this on the server side:
location / {
add_header 'Access-Control-Allow-Origin' '*';
try_files $uri $uri/ /index.php?$args;
}
part for the nginx configurationand in the config.xml:
<preference name="scheme" value="app" />
<preference name="hostname" value="[my-url]" />
the error is still the same:
Origin <"myurl> is not allowed by Access-Control-Allow-Origin
do u have an idea why its still not working?
Fri, 15 Jan 2021 16:23:58 GMT
@prasunjajodia says
maybe it‘s targeting
https://[your-url]
instead ofapp://[your-url]
? I’m not sure though. Just a thought
Fri, 15 Jan 2021 16:25:50 GMT
@prasunjajodia says
Maybe try:
add_header 'Access-Control-Allow-Origin' 'app//[your-url]';