HttpContext.Authentication.SignOutAsync does not delete auth cookie

前端 未结 8 1023
温柔的废话
温柔的废话 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:00

    In my case McGuireV10's answer didn't work as await context.SignOutAsync("oidc", prop); did not redirect to my given redirectUri.

    I solved it by adding HttpContext.Response.Redirect(redirectUri); after the SignOutAsync call.

提交回复
热议问题