Environment Secrets and process.env

Are there additional requirements to using process.env to access Environment Secrets? Is its use limited to certain areas of an app?

I have created secrets at a project level. I confirmed their existence using eas secret:list.
Within ExpoGo or a Bundled app opened in XCode simulator - my experience is the same: When i access a particular secret by name (ie process.env.JAVASCRIPT_KEY) it returns null and when I output process.env i get only {“NODE_ENV”: “production”}

I’ve followed instructions on Environment variables and secrets - Expo Documentation and have hit a wall. Perhaps I am missing a step somewhere.

Did you also follow the link in that document to Environment variables in Expo - Expo Documentation to actually set up your app for using env vars? From the looks of it, you might have only followed the steps to make env vars accessible to the EAS build process, but that won’t make them accessible in your JS code in the app unless you follow those additional steps.

I think you are spot on here. Thank you!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.