Skip to content

feat(react): unified entry points(spa,rwa) for components, hooks, types#204

Merged
grandmaester merged 7 commits intomainfrom
feat/unified-entry-point-dev
Apr 15, 2026
Merged

feat(react): unified entry points(spa,rwa) for components, hooks, types#204
grandmaester merged 7 commits intomainfrom
feat/unified-entry-point-dev

Conversation

@grandmaester
Copy link
Copy Markdown
Contributor

@grandmaester grandmaester commented Mar 25, 2026

Changes

Currently, developers need to choose between /rwa or /spa imports for Auth0 UI components, types & hooks. This delegates implementation details (internal dependencies) to the developer and makes it confusing to understand what to use. We are not implementing the same for providers as of now due to its current architecture. Doing so may cause circular dependencies.

// For SPA
import { UserMFAMgmt } from '@auth0/universal-components-react/spa';
// For RWA
import { UserMFAMgmt } from '@auth0/universal-components-react/rwa';
// ✅ Unified import for ANY application type
import { Auth0ComponentProvider } from '@auth0/universal-components-react/spa';
import { UserMFAMgmt } from '@auth0/universal-components-react';

<UserMFAMgmt />
<Auth0ComponentProvider />

Testing

Examples
image
image

image image image image

Build:
image

Unit Testing:
image

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@grandmaester grandmaester self-assigned this Mar 25, 2026
@grandmaester grandmaester added the enhancement New feature or request label Mar 25, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.70%. Comparing base (38ee2d9) to head (7d2e663).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #204      +/-   ##
==========================================
+ Coverage   88.65%   88.70%   +0.04%     
==========================================
  Files         155      155              
  Lines       13148    13142       -6     
  Branches     1401     1401              
==========================================
  Hits        11657    11657              
+ Misses       1491     1485       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

🚀 Preview deployment

Branch: refs/pull/204/merge
Commit: 612da23

📝 Preview URL: https://auth0-universal-components-ngqdfpfu4-ui-components-217de888.vercel.app


Updated at 2026-04-15T14:37:13.604Z

@grandmaester grandmaester marked this pull request as ready for review April 13, 2026 08:50
Copy link
Copy Markdown
Contributor

@rax7389 rax7389 left a comment

Choose a reason for hiding this comment

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

Image

we should update AGENTS.md as well

@grandmaester
Copy link
Copy Markdown
Contributor Author

grandmaester commented Apr 15, 2026

Hey @rax7389 This specific line of code on Agents.md is for Auth0ComponentProvider, Thats why I havent updated it. Can you please check and confirm?

@rax7389
Copy link
Copy Markdown
Contributor

rax7389 commented Apr 15, 2026

Image we should update AGENTS.md as well

Hey @rax7389 This specific line of code on Agents.md is for Auth0ComponentProvider, Thats why I havent updated it. Can you please check and confirm?

So what we can do for /rwa and /spa we can define 'Auth0ComponentProvider' and for other like blocks and hooks we can use unified path

@grandmaester grandmaester merged commit a29ae8e into main Apr 15, 2026
5 checks passed
@grandmaester grandmaester deleted the feat/unified-entry-point-dev branch April 15, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants