this code is not working

경태 노 41 Reputation points
2022-06-09T07:58:37.487+00:00

at first time, success Challenge().
but after logout() always failed.
always false == Request.IsAuthenticated

why? at challenge(), redirect login page but not autheniticated.

if (!Request.IsAuthenticated)
{
HttpContext.GetOwinContext().Authentication.Challenge(
new AuthenticationProperties { RedirectUri = "/Home/Login" },
OpenIdConnectAuthenticationDefaults.AuthenticationType);
}

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.