将参数传递给Azure Ad B2C上的身份提供者

时间:2019-11-15 10:41:32

标签: azure google-plus azure-ad-b2c

我正在使用Azure AD B2C作为身份验证门户。我试图通过发送查询参数提示符= select_account来确保Google+始终会转到选择帐户页面。但是我很难做到这一点。

从Google文档https://developers.google.com/identity/protocols/OpenIDConnect中可以接收到此参数,这将确保用户选择帐户。

在遵循文档https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow时,假设最后一次身份验证,提示似乎没有到达google。

1 个答案:

答案 0 :(得分:3)

如果要将静态查询参数附加到B2C向Google发出的身份验证请求中,则需要使用自定义策略。您可以在其中为Google配置OAuth提供程序,并为查询参数添加输入声明。

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>