HttpContext.Authentication.SignOutAsync does not delete auth cookie

前端 未结 8 1032
温柔的废话
温柔的废话 2020-12-10 10:16

According to ASP.NET Core documentation the method HttpContext.Authentication.SignOutAsync() must delete the authentication cookie as well.

8条回答
  •  眼角桃花
    2020-12-10 11:13

    Solved the issue with this first line.

    await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
    // await _SignInManager.SignOutAsync();
    // HttpContext.Response.Cookies.Delete(".AspNetCore.Cookies");
    

提交回复
热议问题