I am building a browser game hosted on Playcanvas that stores game data in local storage and makes frequent post requests to one of my API’s to make that data accessible.
Is there a best practice on how/where to store environment variables such as API keys? We are not looking to place the games behind a login screen.
I of course do not want to expose my API key to the public, but maybe I am approaching this problem from the wrong angle. Does anyone have other ideas on other ways to securely send data to an external API?