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
The `User` object holds all of the information for a single user of your application and provides a set of methods to manage their account. Each `User` has at least one authentication [identifier](/docs/authentication/configuration/sign-up-sign-in-options#identifiers), which might be their email address, phone number, or a username.
2
+
3
+
A user can be contacted at their primary email address or primary phone number. They can have more than one registered email address, but only one of them will be their primary email address. This goes for phone numbers as well; a user can have more than one, but only one phone number will be their primary. At the same time, a user can also have one or more external accounts by connecting to [social providers](/docs/authentication/social-connections/overview) such as Google, Apple, Facebook, and many more.
4
+
5
+
Finally, a `User` object holds profile data like the user's name, profile picture, and a set of [metadata](/docs/users/metadata) that can be used internally to store arbitrary information. The metadata are split into `publicMetadata` and `privateMetadata`. Both types are set from the [Backend API](/docs/reference/backend-api){{ target: '_blank' }}, but public metadata can also be accessed from the [Frontend API](/docs/reference/frontend-api){{ target: '_blank' }}.
Copy file name to clipboardexpand all lines: docs/references/javascript/user.mdx
+1-5
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,7 @@ title: '`User` object'
3
3
description: The User object holds all the information for a user of your application and provides a set of methods to manage their account. Users have a unique authentication identifier which might be their email address, phone number or a username.
4
4
---
5
5
6
-
The `User` object holds all of the information for a single user of your application and provides a set of methods to manage their account. Each user has a unique authentication identifier which might be their email address, phone number, or a username.
7
-
8
-
A user can be contacted at their primary email address or primary phone number. They can have more than one registered email address, but only one of them will be their primary email address. This goes for phone numbers as well; a user can have more than one, but only one phone number will be their primary. At the same time, a user can also have one or more external accounts by connecting to [social providers](/docs/authentication/social-connections/overview) such as Google, Apple, Facebook, and many more.
9
-
10
-
Finally, a `User` object holds profile data like the user's name, profile picture, and a set of [metadata](/docs/users/metadata) that can be used internally to store arbitrary information. The metadata are split into `publicMetadata` and `privateMetadata`. Both types are set from the [Backend API](/docs/reference/backend-api){{ target: '_blank' }}, but public metadata can also be accessed from the [Frontend API](/docs/reference/frontend-api){{ target: '_blank' }}.
6
+
<Includesrc="_partials/user-object" />
11
7
12
8
The ClerkJS SDK provides some helper [methods](#methods) on the `User` object to help retrieve and update user information and authentication status.
Copy file name to clipboardexpand all lines: docs/users/creating-users.mdx
+26-13
Original file line number
Diff line number
Diff line change
@@ -3,41 +3,54 @@ title: Create users
3
3
description: Learn how to create users in your Clerk application.
4
4
---
5
5
6
-
There are two ways to create users in Clerk: [through the Clerk Dashboard](#create-users-in-the-clerk-dashboard) or [using the Clerk API](#create-users-using-the-clerk-api).
6
+
There are two ways to create users in Clerk: [in the Clerk Dashboard](#in-the-clerk-dashboard) or [using the Backend API](#using-the-backend-api).
7
7
8
-
## Create users in the Clerk Dashboard
8
+
## In the Clerk Dashboard
9
9
10
10
To create users in the Clerk Dashboard:
11
11
12
12
1. In the top in the Clerk Dashboard, select [**Users**](https://dashboard.clerk.com/last-active?path=users).
13
13
1. Select **Create user**.
14
14
1. Enter the required user details and select **Create**.
15
15
16
-
## Create users using the Clerk API
16
+
## Using the Backend API
17
17
18
-
To create users using the Clerk API, you can use the [`createUser()`](/docs/references/backend/user/create-user) method from the `users` sub-api of the `clerkClient` instance.
18
+
You can create users in your app using Clerk's Backend API.
19
19
20
-
<Tabsitems={["Next.js", "Express", "cURL"]}>
20
+
Use the following tabs to see examples of how to create users using one of the following:
The following example shows how to create a user using the JavaScript Backend SDK's [`createUser()`](/docs/references/backend/user/create-user) method from the `users` sub-api of the `clerkClient` instance.
Copy file name to clipboardexpand all lines: docs/users/deleting-users.mdx
+26-12
Original file line number
Diff line number
Diff line change
@@ -3,38 +3,52 @@ title: Delete users
3
3
description: Learn how to delete users in your Clerk application.
4
4
---
5
5
6
-
There are two ways to delete users in Clerk: [through the Clerk Dashboard](#delete-users-in-the-clerk-dashboard) or [using the Clerk API](#delete-users-using-the-clerk-api).
6
+
There are two ways to delete users in Clerk: [in the Clerk Dashboard](#in-the-clerk-dashboard) or [using the Backend API](#using-the-backend-api).
7
7
8
-
## Delete users in the Clerk Dashboard
8
+
## In the Clerk Dashboard
9
9
10
10
To delete users in the Clerk Dashboard:
11
11
12
12
1. At the top of the Clerk Dashboard, select [**Users**](https://dashboard.clerk.com/last-active?path=users).
13
13
1. You can either select the user and then in the side navigation menu, select **Delete user**, or select the menu icon on the right side of the user's row and select **Delete user**.
14
14
15
-
## Delete users using the Clerk API
15
+
## Using the Backend API
16
16
17
-
To delete users using the Clerk API, you can use the [`deleteUser()`](/docs/references/backend/user/delete-user) method from the `users` sub-api of the `clerkClient` instance.
17
+
You can delete users in your app using Clerk's Backend API.
18
18
19
-
<Tabsitems={["Next.js", "Express", "cURL"]}>
19
+
Use the following tabs to see examples of how to delete users using one of the following:
The following example shows how to delete a user using the JavaScript Backend SDK's [`deleteUser()`](/docs/references/backend/user/delete-user) method from the `users` sub-api of the `clerkClient` instance.
You can revoke an invitation at any time. Revoking an invitation prevents the user from using the invitation link that was sent to them.
93
+
You can revoke an invitation at any time. Revoking an invitation prevents the user from using the invitation link that was sent to them. You can revoke an invitation in the [Clerk Dashboard](#using-clerk-dashboard-2) or [using the Backend API](#using-backend-api-2).
94
94
95
95
### Using Clerk Dashboard
96
96
@@ -101,7 +101,7 @@ To revoke an invitation, navigate to the **Users** page from the top-level menu,
101
101
102
102
### Using Backend API
103
103
104
-
You can either use a cURL command or the [JavaScript Backend SDK](/docs/references/backend/overview) to create an invitation. Use the following tabs to see examples for each method.
104
+
You can either use a cURL command or the [JavaScript Backend SDK](/docs/references/backend/overview) to revoke an invitation. Use the following tabs to see examples for each method.
105
105
106
106
<Tabsitems={["cURL", "Backend SDK"]}>
107
107
<Tab>
@@ -132,4 +132,4 @@ See the [Backend API reference](/docs/reference/backend-api/tag/Invitations#oper
132
132
133
133
## Custom flow
134
134
135
-
Clerk's [prebuilt components](/docs/components/overview) and [Account Portal pages](/docs/account-portal/overview) handle the sign-up flow for you, including the invitation flow. If you want to build a **custom** sign-up flow, see the [custom flow](/docs/custom-flows/application-invitations) guide.
135
+
Clerk's [prebuilt components](/docs/components/overview) and [Account Portal pages](/docs/account-portal/overview) handle the sign-up flow for you, including the invitation flow. If Clerk's prebuilt components don'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. For more information, see the [custom flow for application invitations](/docs/custom-flows/application-invitations).
0 commit comments