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

Mar*_*nes 2 azure google-plus azure-ad-b2c

我使用 Azure AD B2C 作为身份验证门户。我试图通过发送查询参数 prompt=select_account 来保证 Google+ 始终转到选择帐户页面。但是我很难达到这种行为。

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

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

Jas*_*SFT 6

如果要将静态查询参数附加到 B2C 向 Google 发出的 Auth 请求,则需要使用自定义策略。您可以在其中为 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>
Run Code Online (Sandbox Code Playgroud)