diff --git a/Marco.Pms.Services/Program.cs b/Marco.Pms.Services/Program.cs index 048ee27..7b8e51d 100644 --- a/Marco.Pms.Services/Program.cs +++ b/Marco.Pms.Services/Program.cs @@ -202,6 +202,13 @@ builder.Services.AddScoped(); // Singleton services (one instance for the app's lifetime) builder.Services.AddSingleton(); + +string path = Path.Combine(builder.Environment.ContentRootPath, "FireBase", "service-account.json"); + +FirebaseApp.Create(new AppOptions() +{ + Credential = GoogleCredential.FromFile(path), +}); #endregion #region Web Server (Kestrel) @@ -213,20 +220,6 @@ builder.WebHost.ConfigureKestrel(options => #endregion -string path = Path.Combine(builder.Environment.ContentRootPath, "FireBase", "service-account.json"); - -FirebaseApp.Create(new AppOptions() -{ - Credential = GoogleCredential.FromFile(path), -}); - -string path = Path.Combine(builder.Environment.ContentRootPath, "FireBase", "service-account.json"); - -FirebaseApp.Create(new AppOptions() -{ - Credential = GoogleCredential.FromFile(path), -}); - var app = builder.Build(); #region ===================== HTTP Request Pipeline Configuration =====================