You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -90,14 +98,14 @@ Organizations let you group users with roles and permissions, enabling you to bu
90
98
1. Click on the `<OrganizationSwitcher />` component, then **Create an organization**.
91
99
92
100
1. Enter `Acme Org` as the organization name.
93
-
101
+
94
102
1. Invite users to your organization and select their role.
95
103
96
104
## Protect routes by organization and roles
97
105
98
106
You can protect routes based on organization membership, roles, and permissions. The `/protected` page checks if you are an admin in the `Acme Corp` organization:
return <pclassName="text-red-600">You must be signed in as an <strong>admin</strong> to access this page.</p>
117
+
return (
118
+
<pclassName="text-red-600">
119
+
You must be signed in as an <strong>admin</strong> to access this page.
120
+
</p>
121
+
)
110
122
}
111
123
112
124
// Fetch the organization to check its name
@@ -116,26 +128,34 @@ Organizations let you group users with roles and permissions, enabling you to bu
116
128
// Check if organization name matches (e.g., "Acme Corp")
117
129
const requiredOrgName ='Acme Corp'
118
130
if (organization.name!==requiredOrgName) {
119
-
return <pclassName="text-red-600">You are currently not signed in as an <strong>admin</strong> in the <strong>{requiredOrgName}</strong> organization.</p>
131
+
return (
132
+
<pclassName="text-red-600">
133
+
You are currently not signed in as an <strong>admin</strong> in the{''}
134
+
<strong>{requiredOrgName}</strong> organization.
135
+
</p>
136
+
)
120
137
}
121
-
122
-
return <pclassName="text-green-600">You are currently signed in as an <strong>admin</strong> in the <strong>{requiredOrgName}</strong> organization.</p>
138
+
139
+
return (
140
+
<pclassName="text-green-600">
141
+
You are currently signed in as an <strong>admin</strong> in the{''}
142
+
<strong>{requiredOrgName}</strong> organization.
143
+
</p>
144
+
)
123
145
}
124
146
```
125
147
126
148
Learn more about protecting routes and checking organization roles in the [authorization guide](/docs/guides/organizations/roles-and-permissions).
127
149
128
150
## It's time to build your B2B SaaS!
129
151
130
-
You've added Clerk organizations to your Next.js app 🎉. Ready to scale to enterprise customers?
131
-
152
+
You've added Clerk organizations to your Next.js app 🎉. Ready to scale to enterprise customers?
153
+
132
154
-**Control access** with [custom roles and permissions](/docs/guides/organizations/roles-and-permissions) define granular permissions for different user types within organizations.
133
-
155
+
134
156
-**Onboard entire companies** with [verified domains](/docs/guides/organizations/verified-domains) automatically invite users with approved email domains (e.g., `@company.com`) to join organizations without manual invitations.
135
-
136
-
-**Enable enterprise SSO** with [SAML and OIDC](/docs/guides/organizations/sso) let customers authenticate through their identity provider (Okta, Entra ID, Google Workspace) with unlimited connections, no per-connection fees.
137
157
138
-
158
+
-**Enable enterprise SSO** with [SAML and OIDC](/docs/guides/organizations/sso) let customers authenticate through their identity provider (Okta, Entra ID, Google Workspace) with unlimited connections, no per-connection fees.
139
159
</Steps>
140
160
141
161
## Next steps
@@ -159,4 +179,3 @@ Organizations let you group users with roles and permissions, enabling you to bu
0 commit comments