update the if condition.
This commit is contained in:
parent
82f25cc2e5
commit
6d41bcd511
|
@ -545,13 +545,16 @@
|
||||||
url = PageState.Alias.Path;
|
url = PageState.Alias.Path;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PageState.Runtime == Shared.Runtime.Hybrid && PageState.User != null)
|
if (PageState.Runtime == Shared.Runtime.Hybrid)
|
||||||
{
|
{
|
||||||
// hybrid apps utilize an interactive logout
|
if (PageState.User != null)
|
||||||
await UserService.LogoutUserAsync(PageState.User);
|
{
|
||||||
var authstateprovider = (IdentityAuthenticationStateProvider)ServiceProvider.GetService(typeof(IdentityAuthenticationStateProvider));
|
// hybrid apps utilize an interactive logout
|
||||||
authstateprovider.NotifyAuthenticationChanged();
|
await UserService.LogoutUserAsync(PageState.User);
|
||||||
NavigationManager.NavigateTo(url, true);
|
var authstateprovider = (IdentityAuthenticationStateProvider)ServiceProvider.GetService(typeof(IdentityAuthenticationStateProvider));
|
||||||
|
authstateprovider.NotifyAuthenticationChanged();
|
||||||
|
NavigationManager.NavigateTo(url, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user