diff --git a/SigRBlazor/BlazorSignalRApp/BlazorSignalRApp/Server/Startup.cs b/SigRBlazor/BlazorSignalRApp/BlazorSignalRApp/Server/Startup.cs index 9c797e3..828a76d 100644 --- a/SigRBlazor/BlazorSignalRApp/BlazorSignalRApp/Server/Startup.cs +++ b/SigRBlazor/BlazorSignalRApp/BlazorSignalRApp/Server/Startup.cs @@ -38,6 +38,7 @@ public void ConfigureServices(IServiceCollection services) // Configure the Authority to the expected value for your authentication provider // This ensures the token is appropriately validated options.Authority = "http://localhost:5000/"; + options.RequireHttpsMetadata = false; // We have to hook the OnMessageReceived event in order to // allow the JWT authentication handler to read the access @@ -87,11 +88,13 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseHsts(); } + app.UseAuthentication(); app.UseHttpsRedirection(); app.UseBlazorFrameworkFiles(); app.UseStaticFiles(); app.UseRouting(); + app.UseAuthorization(); app.UseEndpoints(endpoints => {