The Auth0 Management API is meant to be used by back-end servers or trusted parties performing administrative tasks. Generally speaking, anything that can be done through the Auth0 dashboard (and more) can also be done through this API.
Initialize your client class with a domain and token:
This client can be used to retrieve user profile information.
import { UserInfoClient } from"auth0";
const userInfo = newUserInfoClient({
domain: "{YOUR_TENANT_AND REGION}.auth0.com",
});
// Get user info with an access tokenconst userProfile = await userInfo.getUserInfo(accessToken);
Legacy Usage
If you are migrating from the legacy node-auth0 package (v4.x) or need to maintain compatibility with legacy code, you can use the legacy export which provides the node-auth0 v4.x API interface.
Installing Legacy Version
The legacy version (node-auth0 v4.x) is available through the /legacy export path:
// Import the legacy version (node-auth0 v4.x API)import { ManagementClient, AuthenticationClient } from"auth0/legacy";
// Or using CommonJSconst { ManagementClient, AuthenticationClient } = require("auth0/legacy");
Legacy Configuration
The legacy API uses the node-auth0 v4.x configuration format and method signatures, which are different from the current v5 API:
To apply the custom domain header globally across your application, use the withCustomDomainHeader option when initializing the ManagementClient. This will automatically inject the header for all whitelisted endpoints.
Retries
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
retry limit (default: 2).
A request is deemed retryable when any of the following HTTP status codes is returned:
The SDK provides access to raw response data, including headers, through the .withRawResponse() method.
The .withRawResponse() method returns a promise that results to an object with a data and a rawResponse property.
While we value open-source contributions to this SDK, this library is generated programmatically.
Additions made directly to this library would have to be moved over to our generation code,
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
an issue first to discuss with us!
On the other hand, contributions to the README are always very welcome!
Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
What is Auth0?
Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?
This project is licensed under the MIT license. See the LICENSE file for more info.
Passport is a popular authentication middleware for Node.js. It is highly flexible and modular, allowing developers to choose from a wide range of authentication strategies. Unlike Auth0, Passport requires more configuration and setup, but it offers greater control over the authentication process.
Firebase Authentication provides backend services for easy use of authentication in web and mobile apps. It supports email/password authentication, social login providers, and anonymous login. Firebase is a part of the Google Cloud Platform and offers a more integrated solution for apps already using other Firebase services.
Okta is an enterprise-grade identity management service that provides secure authentication and authorization. It offers similar features to Auth0, including user management, social login, and multi-factor authentication. Okta is known for its robust security features and is often used in enterprise environments.
The npm package auth0 receives a total of 582,514 weekly downloads. As such, auth0 popularity was classified as popular.
We found that auth0 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 47 open source maintainers collaborating on the project.
Package last updated on 17 Sep 2025
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.