@Deprecated
  default void invokeJBALogin(@Nullable Consumer<? super String> userIdConsumer, @Nullable Runnable onFailure) {
    try {
      //noinspection resource
      LoginSession loginSession = startLoginSession(LoginMode.AUTO);
      loginSession.onCompleted()
        .thenAccept(result -> {
          if (result instanceof LoginResult.LoginSuccessful successful && userIdConsumer != null) {
            userIdConsumer.accept(successful.jbaUser().id);
          }
          if (result instanceof LoginResult.LoginFailed && onFailure != null) {
            onFailure.run();
          }
        });
    }
    catch (Throwable e) {
      Logger.getInstance(JBAccountInfoService.class).error(e);
      if (onFailure != null) {
        onFailure.run();
      }
    }
  }
@Deprecated
  default void invokeJBALogin(@Nullable Consumer<? super String> userIdConsumer, @Nullable Runnable onFailure)