I've created a .net core 2.2 WebAPI project using Visual Studio 2019 for Mac. I have a React Web App as well as a React-Native app. I've been trying to allow the Android emulator to connect to the local debug version but all I get is the following error: [20:50:36 DBG] Failed to authenticate HTTPS connection. System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Interop+AppleCrypto+SslException: unknown certificate
I'm using Android Studio emulator to run the React-Native app. I have the calls going to https://10.0.2.2/ and it's hitting the server without a problem. I have ran dotnet dev-certs --clean and dotnet dev-certs https --trust and it doesn't help at all.
All of the fixes that I've seen so far are either to run the two dotnet commands or to add C# code to turn off the ssl check. Since this is a react-native project, there's no place to put the c# code and I have no idea how to do that in react-native and have been unable to locate anything online.
Any help would be greatly appreciated. Previously, my workaround was to have a remote server that I would just constantly push changes to in order to test the mobile side, but it's getting to be a huge pain to keep doing that.