Skip to content

Commit ed1450d

Browse files
Merge branch 'main' of https://github.com/auth0/auth0-ui-components into refactor/sso-provider-table-hook-architecture
2 parents 401f83a + a29ae8e commit ed1450d

34 files changed

Lines changed: 70 additions & 85 deletions

AGENTS.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@
4040

4141
### `@auth0/universal-components-react`
4242

43-
| Import Path | Contents |
44-
| ------------------------------------------ | ----------------------------------------------------------------------------- |
45-
| `@auth0/universal-components-react/spa` | SPA mode: `Auth0ComponentProvider`, blocks, hooks (uses `@auth0/auth0-react`) |
46-
| `@auth0/universal-components-react/rwa` | RWA/Proxy mode: `Auth0ComponentProvider`, blocks, hooks (uses auth proxy URL) |
47-
| `@auth0/universal-components-react/styles` | CSS stylesheet (`dist/styles.css`) |
43+
| Import Path | Contents |
44+
| ------------------------------------------ | ---------------------------------------- |
45+
| `@auth0/universal-components-react/spa` | SPA mode: `Auth0ComponentProvider` |
46+
| `@auth0/universal-components-react/rwa` | RWA/Proxy mode: `Auth0ComponentProvider` |
47+
| `@auth0/universal-components-react` | components, hooks, types |
48+
| `@auth0/universal-components-react/styles` | CSS stylesheet (`dist/styles.css`) |
4849

4950
### Available Blocks and Hooks
5051

docs-site/src/pages/DomainTableDocs.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,8 @@ export default function DomainTableDocs() {
147147
<section className="space-y-6">
148148
<h2 className="text-2xl font-semibold text-gray-900">Basic Usage</h2>
149149
<CodeBlock
150-
code={`// For SPA applications:
151-
import { DomainTable } from '@auth0/universal-components-react/spa';
152-
153-
// For Next.js/RWA applications:
154-
// import { DomainTable } from '@auth0/universal-components-react/rwa';
150+
code={`// For SPA/Next.js/RWA applications:
151+
import { DomainTable } from '@auth0/universal-components-react';
155152
156153
// For shadcn users:
157154
// import { DomainTable } from '@/components/auth0/my-organization/domain-table';
@@ -748,9 +745,9 @@ interface ComponentAction<T, U = undefined> {
748745
<h2 className="text-2xl font-semibold text-gray-900">Complete Integration Example</h2>
749746
<CodeBlock
750747
code={`import React from 'react';
751-
import { DomainTable } from '@auth0/universal-components-react/rwa';
748+
import { DomainTable } from '@auth0/universal-components-react';
752749
// For SPA mode:
753-
// import { DomainTable } from '@auth0/universal-components-react/spa';
750+
// import { DomainTable } from '@auth0/universal-components-react';
754751
import { UserProvider } from '@auth0/nextjs-auth0/client';
755752
import { Auth0ProxyProvider } from '@auth0/universal-components-react/rwa';
756753
import { useRouter } from 'next/navigation';

docs-site/src/pages/GettingStarted.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ function App() {
503503
</h4>
504504
<CodeBlock
505505
code={`import { useAuth0 } from '@auth0/auth0-react';
506-
import { OrganizationDetailsEdit } from '@auth0/universal-components-react/spa';
506+
import { OrganizationDetailsEdit } from '@auth0/universal-components-react';
507507
508508
function OrganizationManagementPage() {
509509
const { isAuthenticated, isLoading } = useAuth0();
@@ -574,7 +574,7 @@ export default function RootLayout({
574574
<CodeBlock
575575
code={`'use client';
576576
577-
import { OrganizationDetailsEdit } from '@auth0/universal-components-react/rwa';
577+
import { OrganizationDetailsEdit } from '@auth0/universal-components-react';
578578
579579
export default function OrganizationManagementPage() {
580580
return (

docs-site/src/pages/OrganizationDetailsEditDocs.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,8 @@ export default function OrganizationDetailsEdit() {
150150
<section className="space-y-6">
151151
<h2 className="text-2xl font-semibold text-gray-900">Basic Usage</h2>
152152
<CodeBlock
153-
code={`// For SPA applications:
154-
import { OrganizationDetailsEdit } from '@auth0/universal-components-react/spa';
155-
156-
// For Next.js/RWA applications:
157-
// import { OrganizationDetailsEdit } from '@auth0/universal-components-react/rwa';
153+
code={`// For SPA/Next.js/RWA applications:
154+
import { OrganizationDetailsEdit } from '@auth0/universal-components-react';
158155
159156
// For shadcn users:
160157
// import { OrganizationDetailsEdit } from '@/components/auth0/my-organization/organization-details-edit';
@@ -706,7 +703,7 @@ interface ComponentAction<T> {
706703
<h2 className="text-2xl font-semibold text-gray-900">Complete Integration Example</h2>
707704
<CodeBlock
708705
code={`import React from 'react';
709-
import { OrganizationDetailsEdit } from '@auth0/universal-components-react/spa';
706+
import { OrganizationDetailsEdit } from '@auth0/universal-components-react';
710707
import { Auth0Provider } from '@auth0/auth0-react';
711708
import { Auth0ComponentProvider } from '@auth0/universal-components-react/spa';
712709
import { useNavigate } from 'react-router-dom';

docs-site/src/pages/SsoProviderCreateDocs.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,8 @@ export default function SsoProviderCreateDocs() {
147147
<section className="space-y-6">
148148
<h2 className="text-2xl font-semibold text-gray-900">Basic Usage</h2>
149149
<CodeBlock
150-
code={`// For SPA applications:
151-
import { SsoProviderCreate } from '@auth0/universal-components-react/spa';
152-
153-
// For Next.js/RWA applications:
154-
// import { SsoProviderCreate } from '@auth0/universal-components-react/rwa';
150+
code={`// For SPA/Next.js/RWA applications:
151+
import { SsoProviderCreate } from '@auth0/universal-components-react';
155152
156153
// For shadcn users:
157154
// import { SsoProviderCreate } from '@/components/auth0/my-organization/sso-provider-create';
@@ -808,7 +805,7 @@ interface ComponentAction<TInput, TOutput = void> {
808805
<h2 className="text-2xl font-semibold text-gray-900">Complete Integration Example</h2>
809806
<CodeBlock
810807
code={`import React from 'react';
811-
import { SsoProviderCreate } from '@auth0/universal-components-react/spa';
808+
import { SsoProviderCreate } from '@auth0/universal-components-react';
812809
import { Auth0Provider } from '@auth0/auth0-react';
813810
import { Auth0ComponentProvider } from '@auth0/universal-components-react/spa';
814811
import { useNavigate } from 'react-router-dom';

docs-site/src/pages/SsoProviderEditDocs.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,9 @@ export default function SsoProviderEditDocs() {
147147
<section className="space-y-6">
148148
<h2 className="text-2xl font-semibold text-gray-900">Basic Usage</h2>
149149
<CodeBlock
150-
code={`// For SPA applications:
151-
import { SsoProviderEdit } from '@auth0/universal-components-react/spa';
152-
153-
// For Next.js/RWA applications:
154-
// import { SsoProviderEdit } from '@auth0/universal-components-react/rwa';
150+
code={`
151+
// For SPA/Next.js/RWA applications:
152+
import { SsoProviderEdit } from '@auth0/universal-components-react';
155153
156154
// For shadcn users:
157155
// import { SsoProviderEdit } from '@/components/auth0/my-organization/sso-provider-edit';
@@ -1362,7 +1360,7 @@ interface ComponentAction<T, U = undefined> {
13621360
</p>
13631361
<CodeBlock
13641362
code={`import React from 'react';
1365-
import { SsoProviderEdit } from '@auth0/universal-components-react/spa';
1363+
import { SsoProviderEdit } from '@auth0/universal-components-react';
13661364
import { Auth0Provider } from '@auth0/auth0-react';
13671365
import { Auth0ComponentProvider } from '@auth0/universal-components-react/spa';
13681366
import { useNavigate, useParams } from 'react-router-dom';

docs-site/src/pages/SsoProviderTableDocs.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,9 @@ export default function SsoProviderTableDocs() {
146146
<section className="space-y-6">
147147
<h2 className="text-2xl font-semibold text-gray-900">Basic Usage</h2>
148148
<CodeBlock
149-
code={`// For SPA applications:
150-
import { SsoProviderTable } from '@auth0/universal-components-react/spa';
151-
152-
// For Next.js/RWA applications:
153-
// import { SsoProviderTable } from '@auth0/universal-components-react/rwa';
149+
code={`
150+
// For SPA/Next.js/RWA applications:
151+
import { SsoProviderTable } from '@auth0/universal-components-react';
154152
155153
// For shadcn users:
156154
// import { SsoProviderTable } from '@/components/auth0/my-organization/sso-provider-table';
@@ -833,7 +831,7 @@ interface ComponentAction<T, U = undefined> {
833831
<h2 className="text-2xl font-semibold text-gray-900">Complete Integration Example</h2>
834832
<CodeBlock
835833
code={`import React from 'react';
836-
import { SsoProviderTable } from '@auth0/universal-components-react/spa';
834+
import { SsoProviderTable } from '@auth0/universal-components-react';
837835
import { Auth0Provider } from '@auth0/auth0-react';
838836
import { Auth0ComponentProvider } from '@auth0/universal-components-react/spa';
839837
import { useNavigate } from 'react-router-dom';

docs-site/src/pages/UserMFAMgmtDocs.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,8 @@ export default function UserMFA() {
161161
<section className="space-y-6">
162162
<h2 className="text-2xl font-semibold text-gray-900">Basic Usage</h2>
163163
<CodeBlock
164-
code={`// For SPA applications:
165-
import { UserMFAMgmt } from '@auth0/universal-components-react/spa';
166-
167-
// For Next.js/RWA applications:
168-
// import { UserMFAMgmt } from '@auth0/universal-components-react/rwa';
164+
code={`// For SPA/Next.js/RWA applications:
165+
import { UserMFAMgmt } from '@auth0/universal-components-react';
169166
170167
// For shadcn users:
171168
// import { UserMFAMgmt } from '@/components/auth0/my-account/user-mfa-management';
@@ -742,7 +739,8 @@ interface UserMFAMgmtClasses {
742739
<h2 className="text-2xl font-semibold text-gray-900">Complete Integration Example</h2>
743740
<CodeBlock
744741
code={`import React from 'react';
745-
import { UserMFAMgmt, Auth0ComponentProvider } from '@auth0/universal-components-react/spa';
742+
import { UserMFAMgmt } from '@auth0/universal-components-react';
743+
import { Auth0ComponentProvider } from '@auth0/universal-components-react/spa';
746744
import { Auth0Provider } from '@auth0/auth0-react';
747745
748746
function SecurityPage() {

examples/next-rwa/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Edit this file to uncomment `<DomainTable />` and deleted the `<p>` entry and sa
109109
```typescript
110110
'use client';
111111

112-
import { DomainTable } from '@auth0/universal-components-react/rwa';
112+
import { DomainTable } from '@auth0/universal-components-react';
113113

114114
export default function OrganizationManagementPage() {
115115
return (

examples/next-rwa/src/app/domain-management/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
// import { DomainTable } from '@auth0/universal-components-react/rwa';
3+
// import { DomainTable } from '@auth0/universal-components-react';
44

55
export default function DomainManagementPage() {
66
return (

0 commit comments

Comments
 (0)