diff --git a/docs/platforms/react-native/index.mdx b/docs/platforms/react-native/index.mdx index 88a21b1c656e57..ccc3e6703b140b 100644 --- a/docs/platforms/react-native/index.mdx +++ b/docs/platforms/react-native/index.mdx @@ -46,7 +46,7 @@ npx @sentry/wizard@latest -i reactNative - Wrap the _Bundle React Native code and images_ Xcode project build phase script to upload generated source maps and collect bundled node modules. - Add _Upload Debug Symbols to Sentry_ Xcode project build phase. - Run `pod install`. -- Store build credentials in _*ios/sentry.properties*_, _*android/sentry.properties*_ and _*env.local*_. +- Store build credentials in _*ios/sentry.properties*_, _*android/sentry.properties*_ and _*.env.local*_. - Configure Sentry for the supplied DSN in your _*layout.tsx*_/_*App.tsx*_file. diff --git a/docs/platforms/react-native/manual-setup/expo.mdx b/docs/platforms/react-native/manual-setup/expo.mdx index d7159b016a6b81..efc60d7a8880d3 100644 --- a/docs/platforms/react-native/manual-setup/expo.mdx +++ b/docs/platforms/react-native/manual-setup/expo.mdx @@ -29,7 +29,7 @@ npx @sentry/wizard@latest -i reactNative - Wrap the _Bundle React Native code and images_ Xcode project build phase script to upload generated source maps and collect bundled node modules. - Add _Upload Debug Symbols to Sentry_ Xcode project build phase. - Run `pod install`. -- Store build credentials in _*ios/sentry.properties*_, _*android/sentry.properties*_ and _*env.local*_. +- Store build credentials in _*ios/sentry.properties*_, _*android/sentry.properties*_ and _*.env.local*_. - Configure Sentry for the supplied DSN in your _*layout.tsx*_ file. @@ -165,6 +165,6 @@ To verify that everything is working as expected, build the `Release` version of ## Notes -- Don't commit your auth token. Instead, use an environment variable like `SENTRY_AUTH_TOKEN`. +- Don't commit your auth token. Store it in `.env.local` as `SENTRY_AUTH_TOKEN` for local builds, and as an [EAS secret](https://docs.expo.dev/build-reference/variables/#using-secrets-in-environment-variables) for EAS builds. - Source maps for the `Release` version of your application are uploaded automatically during the native application build. - During development, the source code is resolved using the Metro Server and source maps aren't used. This currently doesn't work on web. diff --git a/includes/react-native-expo-plugin-code-snippet.mdx b/includes/react-native-expo-plugin-code-snippet.mdx index b7d1abe646d9d6..63df537e74bab8 100644 --- a/includes/react-native-expo-plugin-code-snippet.mdx +++ b/includes/react-native-expo-plugin-code-snippet.mdx @@ -55,9 +55,14 @@ export default withSentry(config, { -Add auth token to your environment: +Add your auth token to a `.env.local` file in the root of your project: -```bash -# DO NOT COMMIT YOUR AUTH TOKEN -export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___ +```properties {filename:.env.local} +SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___ ``` + + + +Do not commit your auth token. Add `.env.local` to your `.gitignore`. For EAS builds, add `SENTRY_AUTH_TOKEN` as an [EAS secret](https://docs.expo.dev/build-reference/variables/#using-secrets-in-environment-variables) instead of using a `.env.local` file. + +