From 08670a50871b6e38834ff2ec9ecec78dc3edc981 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Mon, 26 Feb 2024 11:14:22 +0100 Subject: [PATCH] fix(rn): Remove unsafe `authToken` option from the Expo setup page --- .../react-native-expo-plugin-code-snippet.mdx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/includes/react-native-expo-plugin-code-snippet.mdx b/includes/react-native-expo-plugin-code-snippet.mdx index e3e02e0f6f552..407f77c141a22 100644 --- a/includes/react-native-expo-plugin-code-snippet.mdx +++ b/includes/react-native-expo-plugin-code-snippet.mdx @@ -6,8 +6,7 @@ "@sentry/react-native/expo", { "url": "https://sentry.io/", - "warning": "DO NOT COMMIT YOUR AUTH TOKEN", - "authToken": "___ORG_AUTH_TOKEN___", + "note": "Use SENTRY_AUTH_TOKEN env to authenticate with Sentry.", "project": "___PROJECT_SLUG___", "organization": "___ORG_SLUG___" } @@ -27,8 +26,7 @@ const config = { module.exports = withSentry(config, { url: "https://sentry.io/", - // DO NOT COMMIT YOUR AUTH TOKEN - authToken: "___ORG_AUTH_TOKEN___", + // Use SENTRY_AUTH_TOKEN env to authenticate with Sentry. project: "___PROJECT_SLUG___s", organization: "___ORG_SLUG___", }); @@ -45,9 +43,15 @@ const config: ExpoConfig = { export default withSentry(config, { url: "https://sentry.io/", - // DO NOT COMMIT YOUR AUTH TOKEN - authToken: "___ORG_AUTH_TOKEN___", + // Use SENTRY_AUTH_TOKEN env to authenticate with Sentry. project: "___PROJECT_SLUG___", organization: "___ORG_SLUG___", }); ``` + +Add auth token to your environment: + +```bash +# DO NOT COMMIT YOUR AUTH TOKEN +export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___ +```