Docs

You are viewing an archived version of the docs.Go to latest version

Users

Depending on your need, Clerk provides a set of tools to manage your users. You can manage user information in the frontend using Clerk's prebuilt components, React hooks, or JavaScript methods, or in the backend using the Clerk Backend SDK.

Understand the 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.

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, but public metadata can be accessed from the Frontend API as well.

Each User has at least one 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 verified 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.

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.

Manage user information in the frontend

Clerk provides the prebuilt components <UserButton /> and <UserProfile /> in order to help your users manage their profile data.

If you are using React, the React SDK provides hooks to help manage user authentication and profile data.

If Clerk's prebuilt components don't meet your specific needs or if you require more control over the logic, you can use React hooks and JavaScript methods to rebuild existing Clerk flows.

Manage user information in the backend

The Clerk Backend SDK exposes Clerk's backend API resources and low-level authentication utilities for JavaScript environments.

For information about the User operations available, such as getUser(), createUser(), and deleteUser(), check out the Backend SDK reference docs.

Feedback

What did you think of this content?

Last updated on