Azure Active Directory Reply URL not working as expected

前端 未结 2 650
生来不讨喜
生来不讨喜 2020-12-14 08:09

I have specified two URLs in my Azure Active Directory website configuration Reply URL. One to redirect to my localhost environment when I am running local code and one to r

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-14 08:39

    For the case of OWIN I have the following configuration solution

                app.UseOpenIdConnectAuthentication(
                new OpenIdConnectAuthenticationOptions
                {
                    ClientId = clientId,
                    Authority = authority,
                    PostLogoutRedirectUri = postLogoutRedirectUri
                    #if !DEPLOY
                    ,RedirectUri = "https://localhost:44369/"
                    #endif
                });
    

    So it uses a local redirect when I am not building for deployment. The project is configured to declare DEPLOY for the version that I am building for deployment. That way, it uses the default redirect URL configured in Azure.

提交回复
热议问题