我試圖使用Azure AD實現身份驗證。在應用程序設置中,我將回復URL設置爲https://example.com/myapp/login.aspx。 當我登錄時,它將我重定向到https://example.com而未指定URL https://example.com/myapp/login.aspx重定向到根的Azure Active Directory響應URL
如何確保它重定向到正確的URL?以下是啓動代碼。
public void Configuration(IAppBuilder app)
{
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
app.UseCookieAuthentication(new CookieAuthenticationOptions());
app.UseOpenIdConnectAuthentication(
new OpenIdConnectAuthenticationOptions
{
ClientId = ConfigurationManager.AppSettings["owin:ClientId"].ToString(),
Authority = "https://login.microsoftonline.com/yz5036e3-2951-4c11-af4d-da019fa6a57d",
RedirectUri = ConfigurationManager.AppSettings["RedirectUri"].ToString()
});
}