tablelandnetwork / studio

Discover, design, deploy, and manage data driven web3 apps on Tableland.
https://studio.tableland.xyz
4 stars 1 forks source link

Remove hard coded api keys #201

Closed joewagner closed 7 months ago

joewagner commented 7 months ago

fixes: https://linear.app/tableland/issue/ENG-494/remove-api-keys-from-the-repo

In preperation to make this repository public this PR removes the hard coded api keys. We will need to add the env vars to the appropriate locations, e.g. Railway and Vercel. We should also cycle these keys since they will still be available in the git history.

railway-app[bot] commented 7 months ago

This PR was not deployed automatically as @joewagner does not have access to the Railway project.

In order to get automatic PR deploys, please add @joewagner to your team on Railway.

linear[bot] commented 7 months ago
ENG-494 Remove API keys from the repo

There are two places in the `web` packages where api keys are hardcoded strings. These have been marked with "TODO:". As a first step we can create a PR that moves these to env vars.

joewagner commented 7 months ago

I've been trying to stick to a standard where all our library packages (everything but web and cli) receive the configuration via some sort of constructor or initialization function. That way, config resolution only happens in one place and can be based on env vars or anything else. So that would mean this function should take the api keys as arguments and the env var reading should happen in web and cli packages. Make sense?

Makes sense, I'll update.

joewagner commented 7 months ago

@asutula I refactored the initialization, does this work how you were thinking it would?