Azure AD B2C integration with Azure AD enable to select profiles

强颜欢笑 提交于 2019-12-11 09:48:22

问题


I have Azure AD B2C where two identity providers Google and Azure AD. Also I have custom policy to login made by this manual. When I click on Google login button in my app, there is a choice of accounts, or I can select to login in new account. But when I select Azure AD provider, then I silently login into my app without any prompt. (The only way to change account is to clear cache of Chrome on my mobile device)

Is it possible to make in custom policy for login in Azure AD enable 'Login as other user' or not?


回答1:


I faced the same issue and I fixed it by adding below code in Configure method for OpenIdConnectOptions

options.Events = new OpenIdConnectEvents
 {

    ...
    OnRedirectToIdentityProvider = async (context) =>
    {
      context.ProtocolMessage.Prompt = "select_account";
    }
 };

Can you share your Startup.cs file?



来源:https://stackoverflow.com/questions/48617939/azure-ad-b2c-integration-with-azure-ad-enable-to-select-profiles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!