SSL Untrusted error in WebView

  1. SDK Version: 41 Version
  2. Platforms(Android/iOS/web/all): Android

I’m building an app with a standalone expo app.
Using WebView to load the login screen of Identity server4.
Due to Identity server4 URL having untrusted root SSL, I am facing an issue in WebView, " SSL error: The certificate authority is not trusted". at both android mobile and emulator.
Can anyone help with this?

I read online that I need to add a network_security_config.xml to the android manifest. Link.

How can I do this in expo (probably app.json) without ejecting?

@admin-support Can someone look on this

Hi @sdinesece

@admin-support is not a member of the Expo team. (Neither am I.)

If it’s a matter of just adding a file during build you could do it in two ways:

1.) Using the eas-build-post-install hook you could copy the file into the right place.
2.) You could write a Config Plugin to generate the file.

I’d probably go with option 1 for a simple “copy this file into the right place before starting the build”.

But I think it would be better to use a free SSL certificate from a well known, trusted CA on the server (e.g. from Let’s Encrypt).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.