How to manage a certificate before open a Web View

Hi everyone.

I am developing an app using a cordova plugin called InAppBrowser. My final objetive is to open a web view both with Android and iOS and show some content which is in an external url. The problem is that i need to validate a certificate to access this resource.

Access by Google Chrome is correctly working, and using _system as a target is also working, which means that Chrome is able to check the certificate before open the site. The problem is when I try to load this in an app browser (using _self or _blank) I get a SSL_NOT_VALID_CERTIFICATE error, because the certificate is not being found.

I don’t know if any of you knows a solution for this topic, but I will be of great help.

Thank you for your time.

What you need to do is SSL pinning…
There are numerous answers about it here on Ionic forum… or online…
for example…
https://forum.ionicframework.com/t/ionic-https-request-not-working-gives-tls-error/192292

And this will work asking for the certificate inside the app?

yes. You need to include your web site’s ssl certificate in the app