将参数传递给Azure Ad B2C上的身份提供者 [英] Pass parameter to Identity Provider on Azure Ad B2C
问题描述
我正在使用Azure AD B2C作为身份验证门户.我试图通过发送查询参数提示符= select_account来确保Google+始终会转到选择帐户页面.但是我很难做到这一点.
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.
从Google文档中, https://developers.google.com/identity/protocols/OpenIDConnect ,则可以接收此参数,这将保证用户可以选择帐户.
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.
推荐答案
如果要将静态查询参数附加到B2C向Google提出的身份验证请求中,则需要使用自定义策略.您可以在其中为Google配置OAuth提供程序,并为查询参数添加输入声明.
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/zh-CN/azure/active-directory-b2c/active-directory-b2c-custom-setup-goog-idp?tabs=applications
<InputClaims>
<InputClaim ClaimTypeReferenceId="QueryParamName" DefaultValue="ValueToSend"/>
</InputClaims>
这篇关于将参数传递给Azure Ad B2C上的身份提供者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!