Skip to content

Commit d58c94f

Browse files
committed
cleanup frontend SDK snippet note
1 parent 8ef1bf5 commit d58c94f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

v2/attackprotectionsuite/frontend-setup.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Below is an example of how to implement request ID generation on your frontend:
2222
```tsx
2323
const ENVIRONMENT_ID = "<environment-id>"; // Your environment ID that you received from the SuperTokens team
2424
// Initialize the agent on page load using your public API key that you received from the SuperTokens team.
25-
const supertokensRequestIdPromise = require("https://deviceid.supertokens.io/PqWNQ35Ydhm6WDUK/k9bwGCuvuA83Ad6s?apiKey=<public-api-key>")
25+
const supertokensRequestIdPromise = require("https://deviceid.supertokens.io/PqWNQ35Ydhm6WDUK/k9bwGCuvuA83Ad6s?apiKey=<PUBLIC_API_KEY>")
2626
.then((RequestId: any) => RequestId.load({
2727
endpoint: [
2828
'https://deviceid.supertokens.io/PqWNQ35Ydhm6WDUK/CnsdzKsyFKU8Q3h2',
@@ -42,7 +42,7 @@ async function getRequestId() {
4242
```
4343

4444
:::note
45-
If you are using a build system such as Webpack, make sure that you do not use string concatenation or interpolation when importing the SDK. This is because the SDK URL is a dynamic URL and the build system might not be able to resolve it during static analysis.
45+
Make sure to replace the `<PUBLIC_API_KEY>` in the above string with the provided public API key.
4646
:::
4747

4848
### Passing the Request ID to the Backend
@@ -59,7 +59,7 @@ import EmailPassword from "supertokens-auth-react/recipe/emailpassword";
5959

6060
const ENVIRONMENT_ID = "<environment-id>"; // Your environment ID that you received from the SuperTokens team
6161
// Initialize the agent on page load using your public API key that you received from the SuperTokens team.
62-
const supertokensRequestIdPromise = require("https://deviceid.supertokens.io/PqWNQ35Ydhm6WDUK/k9bwGCuvuA83Ad6s?apiKey=<public-api-key>")
62+
const supertokensRequestIdPromise = require("https://deviceid.supertokens.io/PqWNQ35Ydhm6WDUK/k9bwGCuvuA83Ad6s?apiKey=<PUBLIC_API_KEY>")
6363
.then((RequestId: any) => RequestId.load({
6464
endpoint: [
6565
'https://deviceid.supertokens.io/PqWNQ35Ydhm6WDUK/CnsdzKsyFKU8Q3h2',

0 commit comments

Comments
 (0)