Auth0.js passwordlessLogin method not invoking callback

Hello,

I’m using the Auth0.js SDK to implement passwordless login for my SPA.

After successfully, logging in a user, I wish to execute a callback to handle some business logic unique to my application. I tried to add this logic by passing it as a callback to the passwordlessStart method given that the passwordlessStart method takes a callback as its second parameter. However, after careful debugging, i.e, logging and setting breakpoints, I’ve confirmed that the callback is not executing. See below for a simplified snippet of my code. As mentioned, I have confirmed that the callback is not executing by setting breakpoints and creating logging statements. Is there something unique to how my app is configured that may be causing this, for instance it being a SPA? Thank you.

    webAuth.passwordlessLogin(
      {
        connection: "email",
        email,
        verificationCode,
      },
      (err, res) => {
        // This callback is NOT executed
        console.log("callback invoked: ", err, res);
      }
    );
  };