diff --git a/Oqtane.Client/Extensions/OqtaneServiceCollectionExtensions.cs b/Oqtane.Client/Extensions/OqtaneServiceCollectionExtensions.cs index bc1d4780..ce563a13 100644 --- a/Oqtane.Client/Extensions/OqtaneServiceCollectionExtensions.cs +++ b/Oqtane.Client/Extensions/OqtaneServiceCollectionExtensions.cs @@ -10,6 +10,7 @@ namespace Microsoft.Extensions.DependencyInjection public static IServiceCollection AddOqtaneAuthorization(this IServiceCollection services) { services.AddAuthorizationCore(); + services.AddCascadingAuthenticationState(); services.AddScoped(); services.AddScoped(s => s.GetRequiredService()); diff --git a/Oqtane.Client/Routes.razor b/Oqtane.Client/Routes.razor index 16c99c52..932b957e 100644 --- a/Oqtane.Client/Routes.razor +++ b/Oqtane.Client/Routes.razor @@ -14,11 +14,9 @@ @if (string.IsNullOrEmpty(_installation.Message)) {
- - - - - + + +
} else diff --git a/Oqtane.Server/Startup.cs b/Oqtane.Server/Startup.cs index c0b48575..eb625a52 100644 --- a/Oqtane.Server/Startup.cs +++ b/Oqtane.Server/Startup.cs @@ -108,6 +108,9 @@ namespace Oqtane services.ConfigureOqtaneIdentityOptions(Configuration); + services.AddCascadingAuthenticationState(); + services.AddAuthorization(); + services.AddAuthentication(options => { options.DefaultScheme = Constants.AuthenticationScheme;