public async Task InvokeAsync(HttpContext context, IAppSignInManager signInManager) { if (context.User.IsInRole("blocked")) { await signInManager.SignOutAsync(); context.Response.Redirect("/Home/Blocked"); } await _next.Invoke(context); }
public async Task <IActionResult> SignOut() { await signInManager.SignOutAsync(); return(RedirectToAction(nameof(Home.Index), nameof(Home))); }