【发布时间】:2021-09-06 01:45:16
【问题描述】:
我正在尝试让 Azure AD 连接服务为我的 dotnet 框架应用程序工作。我浏览了该向导,它添加了它工作所需的必要依赖项和文件。我遇到的问题是它不能可靠地工作。所以我回滚了,我只是在本地工作。但是,如果我输入 localhost/Athena 它将不起作用,但它会将 /signin-oidc 留在 URL 的末尾。当我手动删除最后一部分时,页面工作正常。我得到的错误是
IDX21323:RequireNonce 是“System.Boolean”。 OpenIdConnectProtocolValidationContext.Nonce 为空。
如果我输入 https://localhost/Athena,它每次都能正常工作。下面是我的 Startup.Auth.cs 文件中的代码。
public void ConfigureAuth(IAppBuilder app)
{
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
app.UseCookieAuthentication(new CookieAuthenticationOptions());
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = "8675309",
Authority = authority,
CallbackPath = new PathString("/signin-oidc"),
//Tried with the below redirecturi and I still have the same issues.
//RedirectUri = "https://localhost/Athena/signin-oidc"
});
}
【问题讨论】:
标签: asp.net .net asp.net-mvc azure azure-active-directory