datatheorem / TrustKit-Android

Easy SSL pinning validation and reporting for Android.
MIT License
583 stars 87 forks source link

How to use TrustKit with XHR (XMLHTTPREQUEST) #65

Closed shubhamverma27 closed 4 years ago

shubhamverma27 commented 4 years ago

Hi, I am using trustkit with react native android and able to get it working with okhttp calls but when I use axios which use XHR, it results into a network error. What could be the issue/ implementation for the same? Thanks,

shubhamverma27 commented 4 years ago

Sorry, I found the issue. The issue is I am using 2 different domains. How do I initialise the OkHttp object SSLSocketFactory for 2 different domain-configs?

sureshbakshi commented 4 years ago

@shubhamverma27 have you configured with AXIOS? if yes, please share the steps.

Thanks

shubhamverma27 commented 4 years ago

You can follow the same setup as mentioned in the docs. It will work for axios as well.

shubhamdeol commented 1 year ago

@shubhamverma27 which version of react native you are on? For me app is crashing on start