code: async function confirmResetPassword(form) {
    await client.connect();
    try {
      console.log("token : ", sessionStorage.getItem("token"));
      await api.confirmResetPassword(
        {
          token: sessionStorage.getItem("token"),
          firstPassword: form.firstPassword.value,
          secondPassword: form.secondPassword.value
        },
        "user"
      );
      displayMessage("Reset password", "Password changed", "is-success");
      goTo("login");
      sessionStorage.clear();
    } catch (e) {
      displayMessage(
        "Reset password",
        `Failed to reset the password. Cause: ${e.message}`,
        "is-danger"
      );
    }
  }
docs: Confirm reset password