Class for interfacing with the Auth0 Authentication API endpoints.

Properties

client: Client
clientId: string

The Auth0 client ID

domain: string

The Auth0 tenant domain

Methods

  • Log in a user using an Out Of Band authentication code after they have received the 'mfa_required' error. The MFA token tells the server the username or email, password, and realm values sent on the first request.

    Requires your client to have the MFA OOB Grant Type enabled. See Client Grant Types to learn how to enable it.

    Parameters

    Returns Promise<Credentials>

    A populated instance of Credentials.

  • Log in a user using the One Time Password code after they have received the 'mfa_required' error. The MFA token tells the server the username or email, password, and realm values sent on the first request.

    Requires your client to have the MFA OTP Grant Type enabled. See Client Grant Types to learn how to enable it.

    Parameters

    Returns Promise<Credentials>

    A populated instance of Credentials.

  • Log in a user using a multi-factor authentication Recovery Code after they have received the 'mfa_required' error. The MFA token tells the server the username or email, password, and realm values sent on the first request.

    Requires your client to have the MFA Grant Type enabled. See Client Grant Types to learn how to enable it.

    Parameters

    Returns Promise<Credentials>

    A populated instance of Credentials.

  • Starts the Passworldess flow with an email connection.

    This should be completed later using a call to loginWithEmail, passing the OTP that was sent to the user.

    Parameters

    Returns Promise<void>

  • Starts the Passwordless flow with an SMS connection.

    This should be completed later using a call to loginWithSMS, passing the OTP that was sent to the user.

    Parameters

    Returns Promise<void>

  • Request an email with instructions to change password of a user

    Parameters

    Returns Promise<void>

  • Return user information using an access token

    Parameters

    Returns Promise<User>

    The user's profile information.