Skip to content
Open
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
0280654
Reorganize and restructure Organization docs
Oct 31, 2025
9f7ac66
fix linting errors, hopefully fix build errors
Oct 31, 2025
8ca739d
Merge branch 'main' into im2nguyen/refactor-org-docs
im2nguyen Oct 31, 2025
884b852
anotha attempt to fix build errors
Oct 31, 2025
f2ca024
last missing file error in build
Oct 31, 2025
be700f3
update copy for active voice
Oct 31, 2025
f58ef2a
add relevant links to sso and auth-checks
Oct 31, 2025
019a616
fix linting error, add placeholder diagram for org relationship
Oct 31, 2025
27bb678
docs review
alexisintech Oct 31, 2025
d734d2d
update overview
alexisintech Nov 5, 2025
6913823
another overview update; update metadata
alexisintech Nov 5, 2025
772f1d3
update authorization checks metadata
alexisintech Nov 5, 2025
faec6dd
link fixes
alexisintech Nov 5, 2025
4de425d
Merge branch 'main' into im2nguyen/refactor-org-docs
im2nguyen Nov 6, 2025
0d288fb
Merge branch 'main' into im2nguyen/refactor-org-docs
SarahSoutoul Nov 11, 2025
ef57b7d
docs review pt2
SarahSoutoul Nov 11, 2025
71713d2
Remove typedoc
SarahSoutoul Nov 11, 2025
b8fa177
Merge branch 'main' into im2nguyen/refactor-org-docs
im2nguyen Nov 12, 2025
0fa0ffc
Update docs/guides/organizations/configure.mdx
SarahSoutoul Nov 12, 2025
66d4a08
Update docs/guides/organizations/create-and-manage.mdx
SarahSoutoul Nov 12, 2025
6c0a1d0
Apply suggestions from code review
SarahSoutoul Nov 12, 2025
755bf56
Linting and fix link
SarahSoutoul Nov 12, 2025
56b26e0
Merge branch 'main' into im2nguyen/refactor-org-docs
im2nguyen Nov 14, 2025
e0921ae
reconcile changes from main
Nov 14, 2025
53018c5
fix build errors
Nov 14, 2025
6f50cbc
add orgs quickstart
Nov 14, 2025
4853b4a
remove diagram based on feedback
Nov 14, 2025
ee543a0
simplify overview page even further
Nov 14, 2025
3e70777
hopefully fix all build errors?
Nov 14, 2025
9307abf
lint files so it passes checks
Nov 14, 2025
66daa0f
docs review updates
alexisintech Nov 14, 2025
4017943
Remove clerk typedoc direct change
SarahSoutoul Nov 18, 2025
b720ae3
Re-add clerk typedoc
SarahSoutoul Nov 18, 2025
fa41ceb
Merge branch 'main' into im2nguyen/refactor-org-docs
im2nguyen Nov 18, 2025
8615550
readd add-members to sidebar
Nov 18, 2025
606dacb
clean up sidebar
Nov 18, 2025
8a320bf
Merge branch 'main' into im2nguyen/refactor-org-docs
im2nguyen Nov 18, 2025
a22eff3
rerun lint
Nov 18, 2025
96bfc31
fix lint problems
Nov 18, 2025
5f919bb
revert changes to files
Nov 18, 2025
3b4294c
Merge branch 'main' into im2nguyen/refactor-org-docs
im2nguyen Nov 18, 2025
9c4dffa
create get started w orgs, more streamlined than quickstart
Nov 19, 2025
534566a
fix broken links
Nov 19, 2025
4a10ebc
remove hash
Nov 19, 2025
1875703
run lint on changed files
Nov 19, 2025
be87081
experiment with changes, update title
Nov 19, 2025
28395b7
fix lint errors, update copy for quickstart
Nov 19, 2025
85a739c
Bring back correct formattign TutorialHero
SarahSoutoul Nov 19, 2025
8f5ea07
More removal of unnecessary linting
SarahSoutoul Nov 19, 2025
9a6d925
docs review
SarahSoutoul Nov 19, 2025
b21e03a
Linting
SarahSoutoul Nov 19, 2025
a411070
docs review
alexisintech Nov 19, 2025
fa64d14
update diagram
Nov 19, 2025
6a4dadf
Update docs/guides/organizations/add-members/verified-domains.mdx
im2nguyen Nov 19, 2025
4caa01b
remove callout from tutorial
alexisintech Nov 19, 2025
52bd170
fix redirects
alexisintech Nov 19, 2025
6f92625
Update redirects/static/docs.json
im2nguyen Nov 19, 2025
ed19aff
add line about how to assign custom perm to a user
alexisintech Nov 19, 2025
b40ac94
quickstart (tus version)
Nov 20, 2025
4bf0772
Merge branch 'main' into im2nguyen/refactor-org-docs
im2nguyen Nov 20, 2025
cf55d8c
wrap component name in backticks to escape
Nov 20, 2025
aff5ac1
lint files
Nov 20, 2025
daeaf57
restructure getstarted orgs content
Nov 20, 2025
9076e33
fix build error
Nov 20, 2025
8176513
Merge branch 'main' into im2nguyen/refactor-org-docs
im2nguyen Nov 20, 2025
6abd3a0
Apply suggestions from code review
im2nguyen Nov 20, 2025
702653c
incorporate review feedback (Alexis and Sarah!)
Nov 20, 2025
71202ff
Update docs/guides/organizations/get-started-tu/quickstart.mdx
im2nguyen Nov 20, 2025
fe9c8d9
Update docs/guides/organizations/get-started-tu/quickstart.mdx
im2nguyen Nov 20, 2025
472fa3f
linting
Nov 20, 2025
f923717
capitalize clerk features
alexisintech Nov 21, 2025
506d44f
Merge branch 'main' into im2nguyen/refactor-org-docs
alexisintech Nov 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
| Property | Type | Description |
| --------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="feature"></a> `feature?` | `Autocomplete`\<<code> user:${string} \| org:${string} </code>\> | The [feature](/docs/guides/billing/overview) to check for. |
| <a id="permission"></a> `permission?` | `DisallowSystemPermissions`\<`P`\> | The [permission](/docs/guides/organizations/roles-and-permissions) to check for. |
| <a id="permission"></a> `permission?` | `DisallowSystemPermissions`\<`P`\> | The [permission](/docs/guides/organizations/control-access/roles-and-permissions) to check for. |
| <a id="plan"></a> `plan?` | `Autocomplete`\<<code> user:${string} \| org:${string} </code>\> | The [plan](/docs/guides/billing/overview) to check for. |
| <a id="reverification"></a> `reverification?` | [`ReverificationConfig`](reverification-config.mdx) | The reverification configuration to check for. This feature is currently in public beta. **It is not recommended for production use.** |
| <a id="role"></a> `role?` | `string` | The [role](/docs/guides/organizations/roles-and-permissions) to check for. |
| <a id="role"></a> `role?` | `string` | The [role](/docs/guides/organizations/control-access/roles-and-permissions) to check for. |
2 changes: 1 addition & 1 deletion clerk-typedoc/shared/organization-custom-role-key.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
`OrganizationCustomRoleKey` is a type that represents the user's role in an organization. It will be string unless the developer has provided their own types through [`ClerkAuthorization`](/docs/guides/development/override-clerk-types-interfaces#example-custom-roles-and-permissions).

Clerk provides the [default roles](/docs/guides/organizations/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [custom roles](/docs/guides/organizations/roles-and-permissions#custom-roles) as well.
Clerk provides the [default roles](/docs/guides/organizations/control-access/roles-and-permissions#default-roles) `org:admin` and `org:member`. However, you can create [custom roles](/docs/guides/organizations/control-access/roles-and-permissions#custom-roles) as well.
2 changes: 1 addition & 1 deletion clerk-typedoc/shared/organization-resource.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The `Organization` object holds information about an organization, as well as methods for managing it.

To use these methods, you must have the **Organizations** feature [enabled in your app's settings in the Clerk Dashboard](/docs/guides/organizations/overview#enable-organizations-in-your-application).
To use these methods, you must have the **Organizations** feature [enabled in your app's settings in the Clerk Dashboard](/docs/guides/organizations/overview).

## Properties

Expand Down
2 changes: 1 addition & 1 deletion clerk-typedoc/shared/use-organization-params.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| Property | Type | Description |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="domains"></a> `domains?` | <code>true \| \{ initialPage?: number; pageSize?: number; \} & \{ enrollmentMode?: "manual_invitation" \| "automatic_invitation" \| "automatic_suggestion"; \} & \{ infinite?: boolean; keepPreviousData?: boolean; \}</code> | If set to `true`, all default properties will be used.<br /> Otherwise, accepts an object with the following optional properties: <ul> <li>`enrollmentMode`: A string that filters the domains by the provided [enrollment mode](/docs/guides/organizations/verified-domains#enrollment-mode).</li> <li>Any of the properties described in [Shared properties](#shared-properties).</li> </ul> |
| <a id="domains"></a> `domains?` | <code>true \| \{ initialPage?: number; pageSize?: number; \} & \{ enrollmentMode?: "manual_invitation" \| "automatic_invitation" \| "automatic_suggestion"; \} & \{ infinite?: boolean; keepPreviousData?: boolean; \}</code> | If set to `true`, all default properties will be used.<br /> Otherwise, accepts an object with the following optional properties: <ul> <li>`enrollmentMode`: A string that filters the domains by the provided [enrollment mode](/docs/guides/organizations/add-members/verified-domains#enrollment-mode).</li> <li>Any of the properties described in [Shared properties](#shared-properties).</li> </ul> |
| <a id="invitations"></a> `invitations?` | <code>true \| \{ initialPage?: number; pageSize?: number; \} & \{ status?: ("expired" \| "pending" \| "accepted" \| "revoked")[]; \} & \{ infinite?: boolean; keepPreviousData?: boolean; \}</code> | If set to `true`, all default properties will be used.<br /> Otherwise, accepts an object with the following optional properties: <ul> <li>`status`: A string that filters the invitations by the provided status.</li> <li>Any of the properties described in [Shared properties](#shared-properties).</li> </ul> |
| <a id="membershiprequests"></a> `membershipRequests?` | <code>true \| \{ initialPage?: number; pageSize?: number; \} & \{ status?: "expired" \| "pending" \| "accepted" \| "revoked"; \} & \{ infinite?: boolean; keepPreviousData?: boolean; \}</code> | If set to `true`, all default properties will be used.<br /> Otherwise, accepts an object with the following optional properties: <ul> <li>`status`: A string that filters the membership requests by the provided status.</li> <li>Any of the properties described in [Shared properties](#shared-properties).</li> </ul> |
| <a id="memberships"></a> `memberships?` | <code>true \| \{ initialPage?: number; pageSize?: number; \} & \{ query?: string; role?: string[]; \} & \{ infinite?: boolean; keepPreviousData?: boolean; \}</code> | If set to `true`, all default properties will be used.<br /> Otherwise, accepts an object with the following optional properties: <ul> <li>`role`: An array of [`OrganizationCustomRoleKey`](/docs/reference/javascript/types/organization-custom-role-key).</li> <li>`query`: A string that filters the memberships by the provided string.</li> <li>Any of the properties described in [Shared properties](#shared-properties).</li> </ul> |
2 changes: 1 addition & 1 deletion docs/_partials/has-warning.mdx
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
> [!WARNING]
> Using `has()` **on the server-side** to check permissions works only with **custom permissions**, as [system permissions](/docs/guides/organizations/roles-and-permissions#system-permissions) aren't included in the session token claims. To check system permissions, verify the user's role instead.
> Using `has()` **on the server-side** to check permissions works only with **custom permissions**, as [system permissions](/docs/guides/organizations/control-access/roles-and-permissions#system-permissions) aren't included in the session token claims. To check system permissions, verify the user's role instead.
2 changes: 1 addition & 1 deletion docs/_partials/organization-sync-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object has the type `OrganizationSyncOptions`, which has the following propertie
- `personalAccountPatterns`
- <code>[Pattern](#pattern)\[]</code>

URL patterns for resources that exist within the context of a user's [personal account](/docs/guides/organizations/overview#allow-personal-accounts).
URL patterns for resources that exist within the context of a user's [personal account](/docs/guides/organizations/configure#enable-organizations).

If the route also matches the `organizationPattern` prop, the `organizationPattern` prop takes precedence.

Expand Down
32 changes: 16 additions & 16 deletions docs/getting-started/quickstart.expo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ sdk: expo

<TutorialHero
exampleRepo={[
Copy link
Contributor

Choose a reason for hiding this comment

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

The linting is still here for a few TutorialHero but decided to keep those because they're actually not properly indented on main. Could remove tho, and we can do it as a separate PR. @alexisintech

{
title: "Expo quickstart repo",
link: "https://github.com/clerk/clerk-expo-quickstart",
},
]}
{
title: "Expo quickstart repo",
link: "https://github.com/clerk/clerk-expo-quickstart",
},
]}
beforeYouStart={[
{
title: "Set up a Clerk application",
link: "/docs/getting-started/quickstart/setup-clerk",
icon: "clerk",
},
{
title: "Create an Expo app",
link: "https://docs.expo.dev/get-started/create-a-project/",
icon: "expo",
},
]}
{
title: "Set up a Clerk application",
link: "/docs/getting-started/quickstart/setup-clerk",
icon: "clerk",
},
{
title: "Create an Expo app",
link: "https://docs.expo.dev/get-started/create-a-project/",
icon: "expo",
},
]}
/>

<Steps>
Expand Down
12 changes: 6 additions & 6 deletions docs/getting-started/quickstart.ios.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ sdk: ios

<TutorialHero
beforeYouStart={[
{
title: "Set up a Clerk application",
link: "/docs/getting-started/quickstart/setup-clerk",
icon: "clerk",
}
]}
{
title: "Set up a Clerk application",
link: "/docs/getting-started/quickstart/setup-clerk",
icon: "clerk",
}
]}
/>

<Steps>
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/billing/for-b2b.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Clerk Billing for B2B SaaS allows you to create plans and manage subscriptions *

## Create a plan

Subscription plans are what your customers subscribe to. There is no limit to the number of plans you can create. If your Clerk instance has existing [custom permissions](/docs/guides/organizations/roles-and-permissions), the corresponding features from those permissions will automatically be added to the free plan for orgs. This ensures that organization members get the same set of custom permissions when billing is enabled, because all organizations start on the free plan.
Subscription plans are what your customers subscribe to. There is no limit to the number of plans you can create. If your Clerk instance has existing [custom permissions](/docs/guides/organizations/control-access/roles-and-permissions), the corresponding features from those permissions will automatically be added to the free plan for orgs. This ensures that organization members get the same set of custom permissions when billing is enabled, because all organizations start on the free plan.

To create a plan, navigate to the [**Plans**](https://dashboard.clerk.com/~/billing/plans) page in the Clerk Dashboard. Here, you can create, edit, and delete plans. To setup B2B billing, select the **Plans for Organizations** tab and select **Add Plan**. When creating a plan, you can also create [features](/docs/guides/secure/features) for the plan; see the next section for more information.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ description: Learn how to allow users to sign up and sign in to your Clerk app w

<TutorialHero
beforeYouStart={[
{
title: "A Clerk application is required.",
link: "/docs/getting-started/quickstart/setup-clerk",
icon: "clerk",
},
{
title: "A Dropbox Developer account is required.",
link: "https://www.dropbox.com/developers",
icon: "user-circle",
}
]}
{
title: "A Clerk application is required.",
link: "/docs/getting-started/quickstart/setup-clerk",
icon: "clerk",
},
{
title: "A Dropbox Developer account is required.",
link: "https://www.dropbox.com/developers",
icon: "user-circle",
}
]}
/>

Enabling OAuth with Dropbox allows your users to sign up and sign in to your Clerk application with their Dropbox account.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ description: Learn how to allow users to sign up and sign in to your Clerk app w

<TutorialHero
beforeYouStart={[
{
title: "A Clerk app is required.",
link: "/docs/getting-started/quickstart/setup-clerk",
icon: "clerk",
},
{
title: "A Meta Developer account is required.",
link: "https://developers.facebook.com/docs/development/register",
icon: "user-circle",
}
]}
{
title: "A Clerk app is required.",
link: "/docs/getting-started/quickstart/setup-clerk",
icon: "clerk",
},
{
title: "A Meta Developer account is required.",
link: "https://developers.facebook.com/docs/development/register",
icon: "user-circle",
}
]}
/>

Enabling OAuth with Facebook allows your users to sign up and sign in to your Clerk app with their Facebook account.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ description: Learn how to allow users to sign up and sign in to your Clerk app w

<TutorialHero
beforeYouStart={[
{
title: "A Clerk app is required.",
link: "/docs/getting-started/quickstart/setup-clerk",
icon: "clerk",
},
{
title: "A Twitch account is required.",
link: "https://www.twitch.tv/signup",
icon: "user-circle",
}
]}
{
title: "A Clerk app is required.",
link: "/docs/getting-started/quickstart/setup-clerk",
icon: "clerk",
},
{
title: "A Twitch account is required.",
link: "https://www.twitch.tv/signup",
icon: "user-circle",
}
]}
/>

Enabling OAuth with [Twitch](https://dev.twitch.tv/docs/api/reference#oauth-client-credentials-flow) allows your users to sign up and sign in to your Clerk application with their Twitch account.
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/configure/session-tasks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The following table lists the available tasks and their corresponding components

| Name | Component |
| - | - |
| [Personal accounts disabled (default)](/docs/guides/organizations/overview#allow-personal-accounts) | [`<TaskChooseOrganization />`](/docs/reference/components/authentication/task-choose-organization) |
| [Personal accounts disabled (default)](/docs/guides/organizations/configure#enable-organizations) | [`<TaskChooseOrganization />`](/docs/reference/components/authentication/task-choose-organization) |

> [!IMPORTANT]
> Personal accounts being disabled by default was released on 08-22-2025. Applications created before this date will not be able to see the **Allow personal accounts** setting, because personal accounts were enabled by default.
Expand Down Expand Up @@ -272,7 +272,7 @@ The `useAuth()` hook and helpers that access the [`Auth` object](/docs/reference

#### Example: Personal accounts disabled

When organizations are enabled, [personal accounts are disabled by default](/docs/guides/organizations/overview#allow-personal-accounts) and your users will be required to select or create an organization after authenticating. Until completed, their session remains `pending`. Pages that are protected using Clerk's protection utilities will treat the user's session as signed-out.
When organizations are enabled, [personal accounts are disabled by default](/docs/guides/organizations/configure#enable-organizations) and your users will be required to select or create an organization after authenticating. Until completed, their session remains `pending`. Pages that are protected using Clerk's protection utilities will treat the user's session as signed-out.

For `useAuth()`, `isSignedIn` will be `false` and `userId` and `orgId` will be `null` if the user has a `pending` session.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This guide will walk you through how to build a custom flow that handles user im

<Tabs items={["Next.js", "Expo"]}>
<Tab>
The following example builds a dashboard that is only accessible to users with the `org:admin:impersonate` permission. To use this example, you must first [create the custom `org:admin:impersonate` permission](/docs/guides/organizations/roles-and-permissions#custom-permissions). Or you can modify the [authorization checks](!authorization-check) to fit your use case.
The following example builds a dashboard that is only accessible to users with the `org:admin:impersonate` permission. To use this example, you must first [create the custom `org:admin:impersonate` permission](/docs/guides/organizations/control-access/roles-and-permissions#custom-permissions). Or you can modify the [authorization checks](!authorization-check) to fit your use case.

In the dashboard, the user will see a list of the application's users. When the user chooses to impersonate a user, they will be signed in as that user and redirected to the homepage.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ description: Learn how to use the Clerk API to build a custom flows for acceptin

<Include src="_partials/custom-flows-callout" />

When a user visits an [organization invitation](/docs/guides/organizations/invitations) link, Clerk first checks whether a custom redirect URL was provided.
When a user visits an [organization invitation](/docs/guides/organizations/add-members/invitations) link, Clerk first checks whether a custom redirect URL was provided.

**If no redirect URL is specified**, the user will be redirected to the appropriate Account Portal page (either [sign-up](/docs/guides/customizing-clerk/account-portal#sign-up) or [sign-in](/docs/guides/customizing-clerk/account-portal#sign-in)), or to the custom sign-up/sign-in pages that you've configured for your application.

**If you specified [a redirect URL when creating the invitation](/docs/guides/organizations/invitations#redirect-url)**, you must handle the authentication flows in your code for that page. You can either embed the [`<SignIn />`](/docs/reference/components/authentication/sign-in) component on that page, or if the prebuilt component doesn't meet your specific needs or if you require more control over the logic, you can rebuild the existing Clerk flows using the Clerk API.
**If you specified [a redirect URL when creating the invitation](/docs/guides/organizations/add-members/invitations#redirect-url)**, you must handle the authentication flows in your code for that page. You can either embed the [`<SignIn />`](/docs/reference/components/authentication/sign-in) component on that page, or if the prebuilt component doesn't meet your specific needs or if you require more control over the logic, you can rebuild the existing Clerk flows using the Clerk API.

This guide demonstrates how to use Clerk's API to build a custom flow for accepting organization invitations from a link.

Expand Down
Loading
Loading