使用 Azure Active Directory B2C 设置通过 QQ 帐户注册与登录Set up sign-up and sign-in with a QQ account using Azure Active Directory B2C
备注
此功能目前以公共预览版提供。This feature is in public preview.
创建 QQ 应用程序Create a QQ application
要将 QQ 帐户用作 Azure Active Directory B2C (Azure AD B2C) 中的标识提供者,需要在表示它的租户中创建一个应用程序。To use a QQ account as an identity provider in Azure Active Directory B2C (Azure AD B2C), you need to create an application in your tenant that represents it. 如果还没有 QQ 帐户,可以在 https://ssl.zc.qq.com/en/index.html?type=1&ptlang=1033 注册。If you don't already have a QQ account, you can sign up at https://ssl.zc.qq.com/en/index.html?type=1&ptlang=1033.
注册 QQ 开发人员计划Register for the QQ developer program
- 使用 QQ 帐户凭据登录 QQ 开发人员门户。Sign in to the QQ developer portal with your QQ account credentials.
- 登录后,请转到 https://open.qq.com/reg 将自己注册为开发者。After signing in, go to https://open.qq.com/reg to register yourself as a developer.
- 选择“个人” (individual developer)。Select 个人 (individual developer).
- 输入所需的信息,并选择“下一步” (next step)。Enter the required information and select 下一步 (next step).
- 完成电子邮件验证过程。Complete the email verification process. 注册为开发人员后,需要等待几天,以获得批准。You will need to wait a few days to be approved after registering as a developer.
注册 QQ 应用程序Register a QQ application
- 转到https://connect.qq.com/index.html。Go to https://connect.qq.com/index.html.
- 单击“应用管理” (app management)。Select 应用管理 (app management).
- 选择“创建应用” (create app),然后输入所需的信息。Select 创建应用 (create app) and enter the required information.
- 在“授权回调域” (callback URL) 中输入
https://your-tenant-name.b2clogin.cn/your-tenant-name}.partner.onmschina.cn/oauth2/authresp
。Enterhttps://your-tenant-name.b2clogin.cn/your-tenant-name}.partner.onmschina.cn/oauth2/authresp
in 授权回调域 (callback URL). 例如,如果tenant_name
是 contoso,请将 URL 设置为https://contoso.b2clogin.cn/contoso.partner.onmschina.cn/oauth2/authresp
。For example, if yourtenant_name
is contoso, set the URL to behttps://contoso.b2clogin.cn/contoso.partner.onmschina.cn/oauth2/authresp
. - 选择“创建应用” (create app)。Select 创建应用 (create app).
- 在确认页上选择“应用管理” (app management) 返回应用管理页。On the confirmation page, select 应用管理 (app management) to return to the app management page.
- 选择刚刚创建的应用旁边的“查看” (view)。Select 查看 (view) next to the app you created.
- 选择“修改” (edit)。Select 修改 (edit).
- 复制“应用 ID” 和“应用密钥” 。Copy the APP ID and APP KEY. 将标识提供者添加到租户时需要这两个值。You need both of these values to add the identity provider to your tenant.
将 QQ 配置为标识提供者Configure QQ as an identity provider
- 登录到 Azure 门户。Sign in to the Azure portal.
- 在门户工具栏中选择“目录 + 订阅”图标,然后选择包含 Azure AD B2C 租户的目录 。Select the Directory + Subscription icon in the portal toolbar, and then select the directory that contains your Azure AD B2C tenant.
- 在 Azure 门户中,搜索并选择“Azure AD B2C” 。In the Azure portal, search for and select Azure AD B2C.
- 选择“标识提供者” ,然后选择“QQ (预览)” 。Select Identity providers, then select QQ (Preview).
- 输入“名称” 。Enter a Name. 例如,QQ 。For example, QQ.
- 对于客户端 ID,输入你之前创建的 QQ 应用程序的应用 ID。For the Client ID, enter the APP ID of the QQ application that you created earlier.
- 对于客户端密码,输入你记录的应用密钥。For the Client secret, enter the APP KEY that you recorded.
- 选择“保存” 。Select Save.