You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(js): Quick Start guides: Auth tokens in env files (#14159)
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->
In this PR, I've updated the Source Maps section in the Quick Start
guides (manual setup) to ensure we recommend storing the Sentry auth
token in an environment file instead of directly in the config files.
Updated for SDKs:
- Nuxt
- React Router Framework
- Solidstart
Closes: #13896
## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*
## IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
@@ -218,20 +224,29 @@ Check out the <PlatformLink to="/install/cli-import">`--import` CLI flag</Platfo
218
224
219
225
To upload source maps for clear error stack traces, add your Sentry auth token, organization, and project slugs in the `sentry.sourceMapsUploadOptions` inside your configuration file:
220
226
221
-
```javascript {filename:nuxt.config.ts} {3-9}
227
+
<Alert>These `sentry` options only affect the **build time** of the SDK.</Alert>
228
+
229
+
```javascript {filename:nuxt.config.ts} {3-10}
222
230
exportdefaultdefineNuxtConfig({
223
231
modules: ["@sentry/nuxt/module"],
224
232
sentry: {
225
233
sourceMapsUploadOptions: {
226
234
org:"___ORG_SLUG___",
227
235
project:"___PROJECT_SLUG___",
228
-
authToken:"___ORG_AUTH_TOKEN___",
236
+
// store your auth token in an environment variable
237
+
authToken:process.env.SENTRY_AUTH_TOKEN,
229
238
},
230
239
},
231
240
});
232
241
```
233
242
234
-
<Alert>These `sentry` options only affect the **build time** of the SDK.</Alert>
243
+
To keep your auth token secure, always store it in an environment variable instead of directly in your files:
244
+
245
+
<OrgAuthTokenNote />
246
+
247
+
```bash {filename:.env}
248
+
SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
249
+
```
235
250
236
251
While Nuxt generates source maps on the server side by default, you need to explicitly enable client-side source maps in your Nuxt configuration:
0 commit comments