Skip to content

docs: add security recommendation callout for React SPA setup in Universal Components docs#1366

Open
chakrihacker wants to merge 1 commit into
mainfrom
feat/recommend-rwa-callout
Open

docs: add security recommendation callout for React SPA setup in Universal Components docs#1366
chakrihacker wants to merge 1 commit into
mainfrom
feat/recommend-rwa-callout

Conversation

@chakrihacker

Copy link
Copy Markdown

Description

  • Added a security recommendation callout to the React tab in both the Universal Components overview and the Auth0ComponentProvider setup pages
  • Callout advises production users to prefer the Next.js proxy mode over React SPA mode to avoid token exposure via XSS

Checklist

  • I've read and followed CONTRIBUTING.md.
  • I've tested the site build for this change locally.
  • I've made appropriate docs updates for any code or config changes.
  • I've coordinated with the Product Docs and/or Docs Management team about non-trivial changes.

@chakrihacker chakrihacker requested a review from a team as a code owner June 9, 2026 12:42
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Status Count
🔍 Total 19
✅ Successful 7
⏳ Timeouts 0
🔀 Redirected 1
👻 Excluded 11
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 0

Redirects per input

Redirects in main/docs/get-started/universal-components/universal-components-overview.mdx

@mintlify

mintlify Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
auth0 🟢 Ready View Preview Jun 9, 2026, 12:51 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
auth0-docs-staging 🟢 Ready View Preview Jun 9, 2026, 12:51 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

<Tab title="React">

<Callout icon="shield-halved" color="#F59E0B" iconType="solid">
**Security recommendation:** For production applications, consider using the [Next.js setup](#next-js) instead. Next.js proxy mode keeps tokens server-side and never exposes them to the browser, reducing the risk of token theft via XSS. React SPA mode stores tokens in browser memory, which is suitable for lower-risk scenarios but does not provide the same level of protection.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chakrihacker, has this verbatim been reviewed with @SurajThotakura? I wouldn't use the words like keeps, exposes etc. It needs to be aligned with the overall docs terminology

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Ajey's point, "exposes them to the browser" and "token theft via XSS" read like a vulnerability report rather than product docs.

Suggested copy:

Security recommendation: For production applications that manage Organization configuration, Auth0 recommends the Next.js setup (Regular Web App). Next.js proxy mode stores tokens server-side, which reduces the attack surface compared to browser-stored tokens in a Single Page Application. If you use React SPA mode, review the Token Storage guidance to understand the tradeoffs.

<Tab title="React">

<Callout icon="shield-halved" color="#F59E0B" iconType="solid">
**Security recommendation:** For production applications, consider using the [Next.js setup](#next-js) instead. Next.js proxy mode keeps tokens server-side and never exposes them to the browser, reducing the risk of token theft via XSS. React SPA mode stores tokens in browser memory, which is suitable for lower-risk scenarios but does not provide the same level of protection.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chakrihacker
The anchor [Next.js setup](#next-js) is not resolving properly, it works for the first time but if the user switches the tabs and tries to use this again it breaks.
Link the full next.js tab path directly /docs/get-started/universal-components/auth0-component-provider#next-js

<Tab title="React">

<Callout icon="shield-halved" color="#F59E0B" iconType="solid">
**Security recommendation:** For production applications, consider using the [Next.js setup](#next-js) instead. Next.js proxy mode keeps tokens server-side and never exposes them to the browser, reducing the risk of token theft via XSS. React SPA mode stores tokens in browser memory, which is suitable for lower-risk scenarios but does not provide the same level of protection.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Ajey's point, "exposes them to the browser" and "token theft via XSS" read like a vulnerability report rather than product docs.

Suggested copy:

Security recommendation: For production applications that manage Organization configuration, Auth0 recommends the Next.js setup (Regular Web App). Next.js proxy mode stores tokens server-side, which reduces the attack surface compared to browser-stored tokens in a Single Page Application. If you use React SPA mode, review the Token Storage guidance to understand the tradeoffs.

<Tabs>
<Tab title="React">

<Callout icon="shield-halved" color="#F59E0B" iconType="solid">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same two changes needed here:

  • fix the #next-js anchor
  • align wording with the revised copy

<Tabs>
<Tab title="React">

<Callout icon="shield-halved" color="#F59E0B" iconType="solid">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SurajThotakura we should show this for shadcn as well right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants