using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using MudBlazor.Services; using PlaylistShared.Pwa; using PlaylistShared.Pwa.Services; internal class Program { private static async global::System.Threading.Tasks.Task Main(string[] args) { var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); builder.Services.AddMudServices(); builder.Services.AddScoped(sp => { var apiUrl = builder.Configuration["ApiBaseUrl"] ?? builder.HostEnvironment.BaseAddress; return new HttpClient { BaseAddress = new Uri(apiUrl) }; }); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(sp => sp.GetRequiredService()); builder.Services.AddScoped(); /* builder.Services.AddOidcAuthentication(options => { // Configure your authentication provider options here. // For more information, see https://aka.ms/blazor-standalone-auth builder.Configuration.Bind("Local", options.ProviderOptions); }); */ builder.Services.AddAuthorizationCore(); builder.Services.AddCascadingAuthenticationState(); await builder.Build().RunAsync(); } }