I have a React Native application deployed on devices, and they need to communicate with an endpoint requiring TLS mutual authentication: I need to send a TLS client certificate along with the request.
It works well when in Node (API to API) using request-promise
for instance.
Reusing the same code in React Native didn't work, so I tried a couple other methods / libraries:
- The official
fetch
API does not allow to send client certificates - axios requires
https
which is not available either
I came to realize that maybe React Native does not provide a way of doing it "natively" without using a native module (?), since it would mean importing a TLS implementation in pure JS (inefficient and slow I guess?).
What is the best way to perform mutual TLS authentication from a React Native application?