fixes access to closed session

This commit is contained in:
Paul Schneider 2019-06-14 13:03:14 +01:00
commit 007a21c1f2
7 changed files with 21 additions and 12 deletions

View file

@ -308,6 +308,7 @@ namespace Yavsc.Controllers
public async Task<IActionResult> LogOff(string returnUrl = null)
{
await _signInManager.SignOutAsync();
HttpContext.Session.Clear();
_logger.LogInformation(4, "User logged out.");
if (returnUrl == null) return RedirectToAction(nameof(HomeController.Index), "Home");
return Redirect(returnUrl);