user.identity.isauthenticated가 openid connect를 사용하는 상황에서 항상 false가 됩니다.

제가 사용 중인 asp net frameworksms 4.8 mvc입니다

블록 인용문
public void ConfigureAuth(IAppBuilder app)
{
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
app.UseKentorOwinCookieSaver();//멋대로 MS 토큰 사라지는 문제 해결 라이브러리
app.UseCookieAuthentication(new CookieAuthenticationOptions/());/
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString(“/Account/Login_New”),
Provider = new CookieAuthenticationProvider
{
OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>(
validateInterval: TimeSpan.FromDays(7),
regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
},
CookieManager = new SystemWebCookieManager()
}) ;

           app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions  
           {  
               ClientId = clientId,  
               Authority = authority,  
               PostLogoutRedirectUri = redirectUri,  
               
 
               
             
           });  

app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = clientId,
Authority = authority,
PostLogoutRedirectUri = postLogoutRedirectUri,

    Notifications = new OpenIdConnectAuthenticationNotifications()
    {
        SecurityTokenValidated = (context) =>
        {
            string name = context.AuthenticationTicket.Identity.FindFirst("preferred_username").Value;
            context.AuthenticationTicket.Identity.AddClaim(new Claim(ClaimTypes.Name, name, string.Empty));
            return System.Threading.Tasks.Task.FromResult(0);
        }
    }
});

}

start.cs에서는 이렇게 처리되어 있고

마이크로소프트 로그인 후 돌아올 때 아이덴디티가 쿠키에서 값이 사라져서 user.identity.isAuthenticated가 false가 됩니다. 분명 구글링한데로 Kentorowinsaver를 적용하였음에도 불구하고 쿠키에서 ID 토큰이 사라지는 현상이 발생하는데 해당 현상을 해결할 줄 아시는 선배님들 계신다면 답변 부탁드립니다.

이게 소스는 Core template 같은데 아닌가요??
소스만 보면 미들웨어만 구현되있고

서비스에 AddAuthentication 을 등록 하고
미들웨어에
app.UseAuthorization();
app.UseAuthentication();
이것 하셔야 할텐데요

제 답변은 core 기준입니다. 틀리다며 죄송합니다.

Core가 아닌 ASp.Net Framewwork 4.8 MVC 모델입니다.
위쪽의 public void ConfigureAuth(IAppBuilder app) 부분은 생략하였을 뿐입니다.