Cordova Slack Digest

Sat, 16 Jan 2021 09:05:30 GMT

User count: 4327

Join the conversation at slack.cordova.io

Channel #general (3 messages)


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 its 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 its 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"/>
 &lt;allow-navigation href="<https://www.google.com/recaptcha/*>" /&gt;
    
platform=ios
 &lt;preference name="Hostname" value="myapp.local" /&gt; (cordova-plugin-ionic-webview)
 &lt;allow-navigation href="<http://myapp.local/*>" /&gt;
 &lt;allow-navigation href="<https://www.google.com/recaptcha/*>" /&gt;

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 *"
    /&gt;```

Fri, 15 Jan 2021 16:21:30 GMT

@norman137 says

Is there any specific error text that is produced? Including that may be helpful.

Channel #cordova-ios (3 messages)


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 configuration

and in the config.xml: &lt;preference name="scheme" value="app" /&gt;         &lt;preference name="hostname" value="[my-url]" /&gt;

the error is still the same: Origin &lt;"myurl&gt; 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 of app://[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]';