in FirebaseAdmin/FirebaseAdmin/Auth/Users/FirebaseUserManager.cs [56:90]
internal FirebaseUserManager(Args args)
{
this.ProjectId = args.ProjectId;
if (string.IsNullOrEmpty(this.ProjectId))
{
throw new ArgumentException(
"Must initialize FirebaseApp with a project ID to manage users.");
}
this.TenantId = args.TenantId;
if (this.TenantId == string.Empty)
{
throw new ArgumentException("Tenant ID must not be empty.");
}
this.EmulatorHost = args.EmulatorHost;
this.httpClient = new ErrorHandlingHttpClient<FirebaseAuthException>(
new ErrorHandlingHttpClientArgs<FirebaseAuthException>()
{
HttpClientFactory = args.ClientFactory,
Credential = Utils.ResolveCredentials(this.EmulatorHost, args.Credential),
ErrorResponseHandler = AuthErrorHandler.Instance,
RequestExceptionHandler = AuthErrorHandler.Instance,
DeserializeExceptionHandler = AuthErrorHandler.Instance,
RetryOptions = args.RetryOptions,
});
this.clock = args.Clock ?? SystemClock.Default;
var options = new Utils.UrlOptions
{
TenantId = this.TenantId,
EmulatorHost = this.EmulatorHost,
};
this.baseUrl = Utils.BuildAuthUrl(this.ProjectId, options);
}