asp.net 核心 - 卡在身份验证循环中

asp.net core - stuck in authentication loop

如果我使用

配置身份验证
.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)

一切正常,但如果我配置它

        .AddAuthentication(options => {
            options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
            options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
            options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
        })

即使在成功登录后,用户也会被重定向到登录页面。 我希望两种配置的行为相同。有什么想法吗?

问题是我混合使用身份框架和自定义 claims/cookies。当我踢出身份框架的使用时。一切如期进行。

更多见案例。