Users
Clerk provides the prebuilt components <UserButton />
and <UserProfile />
in order to help your users manage their profile data. However, if you would like to manage user authentication and profile data yourself, or if you would like to build your own profile management flow, Clerk provides a set of APIs to help you do that.
User
object
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.
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 OAuth providers such as Google, Apple, Facebook, and many more.
Finally, a User
object holds profile data like the user's name, profile picture, and a set of 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(opens in a new tab), but public metadata can be accessed from the Frontend API(opens in a new tab) as well.
For more information on the User
object, such as helper methods for retrieving and updating user information and authentication status, checkout the ClerkJS SDK documentation.
If you are using React, the React SDK provides hooks to help manage user authentication and profile data.
User
operations
The Clerk Backend SDK(opens in a new tab) exposes Clerk's backend API resources and low-level authentication utilities for JavaScript environments. While the backend SDK is mainly used as a building block for Clerk's higher-level SDKs, it can also be used on its own for advanced flows and custom integrations.
For information about the User
operations available, such as getUser()
, createUser()
, and deleteUser()
, check out the Backend SDK documentation.