
Auth0 Universal Components for React - pre-built UI components for organization management, SSO configuration, and MFA enrollment.
📚 Documentation - 🚀 Getting Started - 💬 Feedback
For SPA (Single Page Application):
npm install @auth0/universal-components-react @auth0/auth0-react react-hook-form
For Next.js/Server-Side (RWA):
npm install @auth0/universal-components-react react-hook-form
Before using these components, you need an Auth0 account and application:
For detailed setup instructions, follow the Auth0 React Quickstart.
import { Auth0Provider } from '@auth0/auth0-react';
import { Auth0ComponentProvider } from '@auth0/universal-components-react/spa';
import { OrganizationDetailsEdit } from '@auth0/universal-components-react';
import '@auth0/universal-components-react/styles';
function App() {
return (
<Auth0Provider
domain="your-domain.auth0.com"
clientId="your-client-id"
authorizationParams=
interactiveErrorHandler="popup" // Required to handle step-up auth challenges via Universal Login popup
>
<Auth0ComponentProvider themeSettings=>
<OrganizationDetailsEdit />
</Auth0ComponentProvider>
</Auth0Provider>
);
}
// app/layout.tsx or pages/_app.tsx
import { Auth0ComponentProvider } from '@auth0/universal-components-react/rwa';
import '@auth0/universal-components-react/styles';
export default function RootLayout({ children }) {
return (
<html>
<body>
<Auth0ComponentProvider
domain="your-domain.auth0.com"
mode="proxy"
proxyConfig=
themeSettings=
>
{children}
</Auth0ComponentProvider>
</body>
</html>
);
}
import { OrganizationDetailsEdit } from '@auth0/universal-components-react';
function MyPage() {
return (
<div>
<h1>Organization Settings</h1>
<OrganizationDetailsEdit />
</div>
);
}
| Tailwind CSS >= 3.0.0 | Â | >= 4.0.0 (recommended) |
/spa entry point only)We appreciate feedback and contribution to this repo! Before you get started, please read the following:
To provide feedback or report a bug, please raise an issue on our issue tracker.
Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?
This project is licensed under the Apache 2.0 license. See the LICENSE file for more info.