由Azure AD保护的AspCore应用程序陷入无限身份验证重定向循环中

时间:2018-06-20 10:22:34

标签: azure asp.net-core asp.net-core-mvc azure-active-directory

在面向完整.Net Framework的MVC核心Web应用程序中,Azure AD用于身份验证。在Dynamics 365(相同的AD租户)中的IFrame中引用了控制器动作。在Chrome和Firefox中,iFrame陷入了无限重定向循环。

在Edge Browser中,行为是预期的。验证后,页面将正确显示。请求跟踪如下:

在Google Chrome和Firefox中,它最终陷入无限重定向循环,并且请求跟踪如下:

第四个...

关闭浏览器,清除缓存或使用私有模式没有帮助。

该应用程序使用2.1.1版的Microsoft.AspNetCore。*软件包的稳定版本。

Startup.cs中的代码未更改,因为它是由Visual Studio Web App项目模板为组织帐户设置的。

services.AddAuthentication(sharedOptions =>
    {
        sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
        sharedOptions.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
    })
    .AddAzureAd(options => Configuration.Bind("AzureAd", options))
    .AddCookie();

0 个答案:

没有答案
相关问题