Auth0 Node.js SDK - v5.0.0
    Preparing search index...

    Class UserInfoClient

    Auth0 UserInfo API Client

    Provides access to the UserInfo endpoint to retrieve user profile information using an access token obtained during authentication.

    import { UserInfoClient } from 'auth0';

    const userInfoClient = new UserInfoClient({
    domain: 'your-tenant.auth0.com'
    });

    const userInfo = await userInfoClient.getUserInfo(accessToken);
    console.log(userInfo.data.sub, userInfo.data.email);
    Index

    Constructors

    Methods

    Properties

    Constructors

    • Create a new UserInfo API client

      Parameters

      • options: { domain: string } & ClientOptions

        Configuration options including domain and client settings

      Returns UserInfoClient

    Methods

    • Given an access token get the user profile linked to it.

      Parameters

      Returns Promise<JSONApiResponse<UserInfoResponse>>

      <caption>
      Get the user information based on the Auth0 access token (obtained during
      login). Find more information in the
      <a href="https://auth0.com/docs/auth-api#!#get--userinfo">API Docs</a>.
      </caption>

      const userInfoClient = new UserInfoClient({
      domain: '...'
      });

      const userInfo = await userInfoClient.getUserInfo(accessToken);

    Properties

    configuration: Configuration