How do I hide an API's secret access tokens in a production build of an app created with create-react-app
?
I've visited this question but it does not have an acceptable answer to my question. I do not want to use process.env.REACT_APP_SECRET_VALUE
in my app as this variable would be exposed in the client-side javascript.
Given that the production build of a create-react-app
app is composed of static files only, the only solution I can think of involves only using APIs that use a combination of public client IDs and some form of backend client whitelisting, IP or otherwise.
Am I missing something here?