Skip to content

Commit 4a7532d

Browse files
fix(rn): Remove unsafe authToken option from the Expo setup page (#9244)
1 parent 6260099 commit 4a7532d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

includes/react-native-expo-plugin-code-snippet.mdx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"@sentry/react-native/expo",
77
{
88
"url": "https://sentry.io/",
9-
"warning": "DO NOT COMMIT YOUR AUTH TOKEN",
10-
"authToken": "___ORG_AUTH_TOKEN___",
9+
"note": "Use SENTRY_AUTH_TOKEN env to authenticate with Sentry.",
1110
"project": "___PROJECT_SLUG___",
1211
"organization": "___ORG_SLUG___"
1312
}
@@ -27,8 +26,7 @@ const config = {
2726

2827
module.exports = withSentry(config, {
2928
url: "https://sentry.io/",
30-
// DO NOT COMMIT YOUR AUTH TOKEN
31-
authToken: "___ORG_AUTH_TOKEN___",
29+
// Use SENTRY_AUTH_TOKEN env to authenticate with Sentry.
3230
project: "___PROJECT_SLUG___s",
3331
organization: "___ORG_SLUG___",
3432
});
@@ -45,9 +43,15 @@ const config: ExpoConfig = {
4543

4644
export default withSentry(config, {
4745
url: "https://sentry.io/",
48-
// DO NOT COMMIT YOUR AUTH TOKEN
49-
authToken: "___ORG_AUTH_TOKEN___",
46+
// Use SENTRY_AUTH_TOKEN env to authenticate with Sentry.
5047
project: "___PROJECT_SLUG___",
5148
organization: "___ORG_SLUG___",
5249
});
5350
```
51+
52+
Add auth token to your environment:
53+
54+
```bash
55+
# DO NOT COMMIT YOUR AUTH TOKEN
56+
export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
57+
```

0 commit comments

Comments
 (0)