Merge pull request #158 from sbwalker/master
fix logout issue introduced when logging was added
This commit is contained in:
commit
59c7af4fb0
|
@ -22,6 +22,6 @@ namespace Oqtane.Services
|
|||
|
||||
Task<User> LoginUserAsync(User User, bool SetCookie, bool IsPersistent);
|
||||
|
||||
Task LogoutUserAsync();
|
||||
Task LogoutUserAsync(User User);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,10 +81,10 @@ namespace Oqtane.Services
|
|||
return await http.PostJsonAsync<User>(apiurl + "/login?setcookie=" + SetCookie.ToString() + "&persistent =" + IsPersistent.ToString(), User);
|
||||
}
|
||||
|
||||
public async Task LogoutUserAsync()
|
||||
public async Task LogoutUserAsync(User User)
|
||||
{
|
||||
// best practices recommend post is preferrable to get for logout
|
||||
await http.PostJsonAsync(apiurl + "/logout", null);
|
||||
await http.PostJsonAsync(apiurl + "/logout", User);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
private async Task LogoutUser()
|
||||
{
|
||||
await UserService.LogoutUserAsync();
|
||||
await UserService.LogoutUserAsync(PageState.User);
|
||||
|
||||
var authstateprovider = (IdentityAuthenticationStateProvider)ServiceProvider.GetService(typeof(IdentityAuthenticationStateProvider));
|
||||
if (authstateprovider == null)
|
||||
|
|
Loading…
Reference in New Issue
Block a user