reCaptcha v2 & Invisible Captcha on Cordova-based apps - android

Has anyone ever tried to integrate reCaptcha v2 or the invisible captcha on a Cordova-based app?
I have configured everything correctly. Once I launch my page as a Web Site, everything works great and I see the reCaptcha v2 working. However, when I run the page as an app on Android or iOS I see the error which says:
ERROR for site owner:
Invalid domain for site key
I've also unchecked the option in Google Console to prevent the domain check, but it only affected the web site and not the app.
Does anyone have any experience integrating reCaptcha v2 or invisilbe Captcha in a cordova-based app?

After deep investigation seems that the issue is related to the fact that the Cordova-based apps run over the file:/// protocol which seems to cause the issue.
Actually we've faced the issue only on Android devices, ios devices seem to work fine.
We've finally fixed the issue creating a web page on our web site and putting there the invisible recaptcha library then we've linked the page inside an iFrame in the app.
This tricks let us to run the recaptcha library over the http protocol which has fixed the issue.

Try to install cordova-plugin-ionic-webview#latest using the below command
cordova plugin add cordova-plugin-ionic-webview#latest

Related

Firebase dynamic link always open web version instead of Google play

App not installed. Clicking to firebase dynamic link lead to browser and open web content.
I am using this dynamic link: https://market.page.link/?link=https://market.kz/cabinet
I followed this doc: https://firebase.google.com/docs/dynamic-links/create-manually
I tried specify afl and apn but it didnt help.
The reason seems not be under developpers control. I had this problem too because i was always testing with the same app when opening the firebase dynamic link (Skype mobile).
I could not tell you exactly which app are causing this problem, but i can tell you that if you open a firebase dynamic link using skype in your Android device (strangely, it works fine with iOs), it will redirect to your browser at the Google play page.
You should try using another mobile app and open the link and see if it works. I tried facebook messenger and telegram and it works fine.
See more here : https://github.com/firebase/flutterfire/issues/2828

React Native WebView Google signin not working

I created mobile app using React-native and I am loading my react js website inside the app using react-native-webview. There is google signing option in the website, that is not working in app, It showing disallowed_useragent, after that i added userAgent in webview, still google signing not working, is there any solution for this?
Kindly help me.
Thanks

"Google Maps JavaScript API error: RefererNotAllowedMapError " error from trying to use api from within React Cordova iOS, but works fine in Android

I have in my index.html for my WebApp and Cordova App:
And the code works perfectly to load the google api, in my webapp, and Cordova for iOS and Android apps.
For the webapp I loaded the various URLs that I wanted to authorize:
http://wevote.us/*
https://wevote.us/*
http://localhost:3000/*
https://localhost:3000/*
All worked perfectly for the webapp.
Then I ran the same code in Android (within Cordova). A console error said to add "file_url//android_asset/www/index.html#/ballot" on the Google Cloud Console, which I did, and 5 minutes later my hybrid Android app was working perfectly.
__file_url__//android_asset/www/index.html#/ballot
But with iOS, the similar console error says
2018-05-23 13:59:22.344204-0700 WeVoteCordova[52841:2772856] ERROR: Google Maps JavaScript API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error Your site URL to be authorized: __file_url__//Users/stevepodell/Library/Developer/CoreSimulator/Devices/D476226046...99AEE3DC/data/Containers/Bundle/Application/7A844..10D/WeVoteCordova.app/www/index.html#/ballot
Clearly any URL that contains paths on my Mac is not going to work, but as an experiment, I simply added that suggested url (knowing it would only work for one build, on one simulator) and the Google Cloud Server API key page crashed on save, and did not retain the data.
Has anyone gotten this to work on iOS?
There is a google bug https://issuetracker.google.com/issues/35828931 but it is closed, and it looks like it is not being seen.
Updated May 24, 2018:
There now is an open google bug https://issuetracker.google.com/issues/80230742

Ionic : Can't display facebook embedded posts in a iFrame on Android

I have some issue with ionic and facebook for displaying a post with the facebook iFrame. It bothers me a little because this method was working 2 months ago and now it seems that it has changed.
I have followed the method provided by Facebook Developers at this link.
The post display very well on a browser but not on a real device. However, I don't have any console error while making request on the phone. Just an iFrame saying the post doesn't exist (It is the one of the example given by Facebook).
I have already install the cordova whitelist plugin for the allow-origins problem.
I really don't see what has changed since the last time. Did facebook made a change in their plugins ? Or am I forgetting something on the device side ?
Thanks for your advice.
i think as it says in the facebook developers faqs
for the web simple copy paste works but for ios/android you have to register for a developer's account and register an app as well
this guide might also be of help
https://ionicframework.com/docs/native/facebook

PhoneGap application doesn't work on device, but correctly works as web application

I develop web/phone app that uses Google Endpoints.
App properly works from localhost and when deployed to GAE.
App also properly works in Intel XDK emulator and when debugged in Intel XDK App Preview on device.
App doesn't works when run on Android device as .apk. Looks like it cannot make call to Google Endpoints.
It also doesn't works when running in browser from file system. In this case I see the exception:
Failed to execute 'postMessage' on 'DOMWindow': The target origin
provided ('file://') does not match the recipient window's origin
('null').
Some answers (Google API in Javascript) provide information that issue can be solved by changing configuration on Google Console, but I cannot found anything in Google Console that related to origin.
I am new to mobile development, so I can had miss something obvious.
Any help will be very appreciated.
As it was supposed by konqi problem had solved by domain whitelistening
In Intel XDK it can be done by following next steps:
Open Projects Tab
Expand Build Settings
Enter "*" (without quotes) to Domain List field.

Categories

Resources