How to add API security keys into JS of wordpress securely
You can’t. Any secrets you put into your pages or JavaScript can be read out of the downloaded files by the client. Instead, you probably want to either: Move the secrets into your server-side code and have your server code make requests to external APIs using the secrets, and use WordPress nonces and login cookies … Read more