use new Cascading Authentication State Services
This commit is contained in:
@ -10,6 +10,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
public static IServiceCollection AddOqtaneAuthorization(this IServiceCollection services)
|
||||
{
|
||||
services.AddAuthorizationCore();
|
||||
services.AddCascadingAuthenticationState();
|
||||
services.AddScoped<IdentityAuthenticationStateProvider>();
|
||||
services.AddScoped<AuthenticationStateProvider>(s => s.GetRequiredService<IdentityAuthenticationStateProvider>());
|
||||
|
||||
|
@ -14,11 +14,9 @@
|
||||
@if (string.IsNullOrEmpty(_installation.Message))
|
||||
{
|
||||
<div style="@_display">
|
||||
<CascadingAuthenticationState>
|
||||
<CascadingValue Value="@PageState">
|
||||
<SiteRouter RenderMode="@RenderMode" Runtime="@Runtime" VisitorId="@VisitorId" OnStateChange="@ChangeState" />
|
||||
</CascadingValue>
|
||||
</CascadingAuthenticationState>
|
||||
<CascadingValue Value="@PageState">
|
||||
<SiteRouter RenderMode="@RenderMode" Runtime="@Runtime" VisitorId="@VisitorId" OnStateChange="@ChangeState" />
|
||||
</CascadingValue>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user