Using Azure Active Directory - one application to login locally and when published

后端 未结 1 1612
無奈伤痛
無奈伤痛 2020-12-31 17:32

I\'m building an MVC application with Azure Active Directory authentication. When I develop locally I would like to be able to sign-in for testing/development purposes. And

相关标签:
1条回答
  • 2020-12-31 18:18

    You can add multiple redirect uri to your app, that's why the property is implemented as a list! You just need to make sure that you specify which URI to use at runtime. You can do that in many ways - you can specify the return URI at middleware init time, or you can add dynamic code that will inject a redirect URI in the sign in message. For an example of the latter approach, please see RedirectToIdentityProvider in https://github.com/AzureADSamples/WebApp-MultiTenant-OpenIdConnect-DotNet/blob/master/TodoListWebApp/App_Start/Startup.Auth.cs

    0 讨论(0)
提交回复
热议问题