RealComposer
Client PlatformsOfficial Expo docs

Expo Safe & Unsafe Practices

Direct Answer

Expo inlines EXPO_PUBLIC_ variables and app config extra fields into the JavaScript bundle, and EAS Update publishes that bundle to every device. EAS secret environment variables are safe only while they stay in build tooling. Proxy private API calls and keep tokens in SecureStore.

Credentials & Where They Belong

Client safe
EXPO_PUBLIC_ variables and app config extra

Inlined into each build and OTA update.

Server only
EAS secret environment variables

Safe for build steps only, never read into app code.

Client safe
Session tokens

Store with expo-secure-store.

Safe Practices

  • Keep build secrets in EAS with secret visibility

    Use them for signing or build hooks, and never expose them to the runtime bundle.

  • Store tokens with expo-secure-store

    It is backed by Keychain on iOS and Keystore on Android.

Unsafe Practices

  • Reading secret keys through app config extra

    Constants.expoConfig values are bundled and downloadable from published updates.

  • Assuming OTA updates are private

    EAS Update bundles are delivered to every installed app and can be inspected.

The RealComposer Pattern

Store upstream keys in the RealComposer vault and give the Expo app only a client token, so rotating a secret never requires a new build or OTA update.

START BUILDING FREE

Frequently Asked Questions

Q:Are EAS environment variables secret inside my Expo app?

Only if they never reach app code. Anything read at runtime through EXPO_PUBLIC_ or app config is public.

Security & Secret Vault

Hide Anthropic API Key in an Expo App

EXPO_PUBLIC_ variables and app config extra fields are inlined into every Expo build and EAS Update bundle, so an Anthropic key placed there is public. Call a RealComposer pipeline instead: it injects ANTHROPIC_API_KEY as the x-api-key header at the edge and returns just the reply text.

Sub-10ms edgeView Recipe
Security & Secret Vault

Protect Supabase Service Role Key in Expo

The Supabase service_role key bypasses row level security, so it must never appear in an Expo app or OTA update. Keep the anon key in the app for normal queries and send privileged reads to a RealComposer pipeline that holds service_role in the vault and returns filtered fields.

Sub-10ms edgeView Recipe

Related Concepts