Expo Secrets are lost when using expo publish and building with EAS

When building with EAS the expo secrets I configured are associated to process.env.MY_VARIABLE correctly. But when I use expo publish the environment variable values are lost. I know they are only available during the build process but is there any way to not lose those values when I want to use the OTA update feature?

I would have prefer to use .env files but they are in my .gitignore and I know eas build ignore those files

secrets are only applied to eas build. you do not want to use secrets in your final published bundle. anyone can read those. secrets are just meant for built time values (eg: sentry api key) that you will use during build but never during runtime

But with babel-plugin-transform-inline-environment-variables would it be safer?

what do you mean by “safer”? you should never include secrets in client side code. only include text that you are comfortable with anybody in the world reading

you’re right, I tried to find a way around expo secrets to achieve what I needed

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