I am trying to follow sample WebApp-WebApi-OIDC but it gets stuck in infinite loop during authentication when calling WebApi. Following code in MVC TodoListController leads to this weird behavior:
if (Request.QueryString["reauth"] == "True") {
HttpContext.GetOwinContext().Authentication.Challenge(
new AuthenticationProperties(),
OpenIdConnectAuthenticationDefaults.AuthenticationType);
}
I also tried following SystemWebCookieManager workaround but it didn't help.
Is there a known bug or am I not implementing it correctly?
Thanks!