public static FirebaseUserManager Create(FirebaseApp app)
        {
            var args = new FirebaseUserManagerArgs
            {
                ClientFactory = app.Options.HttpClientFactory,
                Credential    = app.Options.Credential,
                ProjectId     = app.GetProjectId(),
            };

            return(new FirebaseUserManager(args));
        }
        internal FirebaseUserManager(FirebaseUserManagerArgs args)
        {
            if (string.IsNullOrEmpty(args.ProjectId))
            {
                throw new ArgumentException(
                          "Must initialize FirebaseApp with a project ID to manage users.");
            }

            this.httpClient = args.ClientFactory.CreateAuthorizedHttpClient(args.Credential);
            this.baseUrl    = string.Format(IdTooklitUrl, args.ProjectId);
        }
        internal static FirebaseUserManager Create(FirebaseApp app)
        {
            var projectId = app.GetProjectId();

            if (string.IsNullOrEmpty(projectId))
            {
                throw new ArgumentException(
                          "Must initialize FirebaseApp with a project ID to manage users.");
            }

            var args = new FirebaseUserManagerArgs
            {
                ClientFactory = new HttpClientFactory(),
                Credential    = app.Options.Credential,
                ProjectId     = projectId,
            };

            return(new FirebaseUserManager(args));
        }
        internal FirebaseUserManager(FirebaseUserManagerArgs args)
        {
            if (string.IsNullOrEmpty(args.ProjectId))
            {
                throw new ArgumentException(
                          "Must initialize FirebaseApp with a project ID to manage users.");
            }

            this.httpClient = new ErrorHandlingHttpClient <FirebaseAuthException>(
                new ErrorHandlingHttpClientArgs <FirebaseAuthException>()
            {
                HttpClientFactory           = args.ClientFactory,
                Credential                  = args.Credential,
                ErrorResponseHandler        = AuthErrorHandler.Instance,
                RequestExceptionHandler     = AuthErrorHandler.Instance,
                DeserializeExceptionHandler = AuthErrorHandler.Instance,
            });
            this.baseUrl = string.Format(IdTooklitUrl, args.ProjectId);
        }
 internal FirebaseUserManager(FirebaseUserManagerArgs args)
 {
     _httpClient = args.ClientFactory.CreateAuthorizedHttpClient(args.Credential);
     _baseUrl    = string.Format(ID_TOOLKIT_URL, args.ProjectId);
 }