@auth0/auth0-react
    Preparing search index...

    Interface MyAccountApiClient

    Client for Auth0 MyAccount API operations.

    Provides methods for managing the current user's account:

    • Connected accounts (link/unlink external identity providers)
    • MFA factors
    • Authentication methods (passkeys, phone, email, TOTP) - list, get, update, delete
    • Authentication method enrollment (challenge and verify)
    interface MyAccountApiClient {
        completeAccount(params: CompleteRequest): Promise<CompleteResponse>;
        connectAccount(params: ConnectRequest): Promise<ConnectResponse>;
        deleteAuthenticationMethod(id: string): Promise<void>;
        enrollmentChallenge(
            options: EnrollmentChallengeOptions,
        ): Promise<EnrollmentChallengeResponse>;
        enrollmentVerify(
            options: EnrollmentVerifyOptions,
        ): Promise<AuthenticationMethod>;
        getAuthenticationMethod(id: string): Promise<AuthenticationMethod>;
        getAuthenticationMethods(
            type?: AuthenticationMethodType,
        ): Promise<AuthenticationMethod[]>;
        getFactors(): Promise<Factor[]>;
        updateAuthenticationMethod(
            id: string,
            data: UpdateAuthenticationMethodRequest,
        ): Promise<AuthenticationMethod>;
    }
    Index

    Methods

    • Verify the redirect from the connect account flow and complete the connecting of the account.

      Parameters

      • params: CompleteRequest

        Completion parameters including auth session, connect code, and redirect URI

      Returns Promise<CompleteResponse>

      A promise that resolves to the completed connected account details

    • Get a ticket for the connect account flow.

      Parameters

      • params: ConnectRequest

        Connection parameters including connection name and redirect URI

      Returns Promise<ConnectResponse>

      A promise that resolves to a connect response with the redirect URI and auth session

    • Delete an authentication method by ID.

      Parameters

      • id: string

        The ID of the authentication method to delete

      Returns Promise<void>

      A promise that resolves when the authentication method has been deleted

    • Start the enrollment of an authentication method for the current user. The response shape varies by type.

      Parameters

      Returns Promise<EnrollmentChallengeResponse>

      A promise that resolves to the enrollment challenge response (shape varies by type)

    • Confirm the enrollment of an authentication method to complete registration.

      Parameters

      • options: EnrollmentVerifyOptions

        Enrollment verify options including the auth session and type-specific verification data

      Returns Promise<AuthenticationMethod>

      A promise that resolves to the confirmed authentication method

    • Get an authentication method by ID.

      Parameters

      • id: string

        The ID of the authentication method to retrieve

      Returns Promise<AuthenticationMethod>

      A promise that resolves to the authentication method

    • Get a list of all authentication methods for the current user.

      Parameters

      Returns Promise<AuthenticationMethod[]>

      A promise that resolves to an array of authentication methods

    • Get the status of all factors for the current user.

      Returns Promise<Factor[]>

      A promise that resolves to an array of factors with their enabled/disabled status

    • Update details of an authentication method by ID.

      Parameters

      • id: string

        The ID of the authentication method to update

      • data: UpdateAuthenticationMethodRequest

        The fields to update (e.g. name, preferred_authentication_method for phone)

      Returns Promise<AuthenticationMethod>

      A promise that resolves to the updated authentication method