Pass parameter to Identity Provider on Azure Ad B2C

久未见 提交于 2020-01-13 20:25:13

问题


I am using Azure AD B2C as an authentication portal. I am trying to guarantee that the Google+ always goes to select account page, by sending the query parameter prompt=select_account. But I am having an hard time reaching this behavior.

From google documentation, https://developers.google.com/identity/protocols/OpenIDConnect, it's possible to receive this parameter, which will guarantee that user goes to select account.

When following the documentation, https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow, it seems that the prompt doesn't reach google, assuming the last authentication.


回答1:


If you want to append a static query parameter to the Auth Request that B2C makes to Google, then you need to use a Custom Policy. In which you can configure an OAuth provider for Google, and add an input claim for your query parameter.

https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-get-started-custom?tabs=applications

https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-custom-setup-goog-idp?tabs=applications

      <InputClaims>
        <InputClaim ClaimTypeReferenceId="QueryParamName" DefaultValue="ValueToSend"/>
      </InputClaims>


来源:https://stackoverflow.com/questions/58875278/pass-parameter-to-identity-provider-on-azure-ad-b2c

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