使用 Azure Active Directory B2C 设置通过微博帐户注册与登录Set up sign-up and sign-in with a Weibo account using Azure Active Directory B2C

Note

此功能为预览版。This feature is in preview.

创建 Weibo 应用程序Create a Weibo application

要将微博帐户用作 Azure Active Directory (Azure AD) B2C 中的标识提供者,需要在表示它的租户中创建一个应用程序。To use a Weibo account as an identity provider in Azure Active Directory (Azure AD) B2C, you need to create an application in your tenant that represents it. 如果还没有微博帐户,可以在 https://weibo.com/signup/signup.php?lang=en-us 获取。If you don’t already have a Weibo account, you can get it at https://weibo.com/signup/signup.php?lang=en-us.

  1. 使用微博帐户凭据登录微博开发人员门户Sign in to the Weibo developer portal with your Weibo account credentials.
  2. 登录后,选择右上角的显示名称。After signing in, select your display name in the top-right corner.
  3. 在下拉列表中,选择“编辑开发者信息”(edit developer information)。In the dropdown, select 编辑开发者信息 (edit developer information).
  4. 输入所需的信息,并选择“提交” (submit)。Enter the required information and select 提交 (submit).
  5. 完成电子邮件验证过程。Complete the email verification process.
  6. 转到“身份验证”页Go to the identity verification page.
  7. 输入所需的信息,并选择“提交” (submit)。Enter the required information and select 提交 (submit).

注册 Weibo 应用程序Register a Weibo application

  1. 转到“新 Weibo 应用注册”页Go to the new Weibo app registration page.
  2. 输入所需的应用程序信息。Enter the necessary application information.
  3. 选择“创建”(create)。Select 创建 (create).
  4. 复制应用密钥应用机密的值。Copy the values of App Key and App Secret. 将标识提供者添加到租户时需要这两项。You need both of these to add the identity provider to your tenant.
  5. 上传所需的照片,并输入所需的信息。Upload the required photos and enter the necessary information.
  6. 选择“保存以上信息”(save)。Select 保存以上信息 (save).
  7. 选择“高级信息”(advanced information)。Select 高级信息 (advanced information).
  8. 选择 OAuth2.0“授权设置”(redirect URL) 字段旁边的“编辑”(edit)。Select 编辑 (edit) next to the field for OAuth2.0 授权设置 (redirect URL).
  9. 为 OAuth2.0“授权设置”(redirect URL) 输入 https://your-tenant-name.b2clogin.cn/your-tenant-name.partner.onmschina.cn/oauth2/authrespEnter https://your-tenant-name.b2clogin.cn/your-tenant-name.partner.onmschina.cn/oauth2/authresp for OAuth2.0 授权设置 (redirect URL). 例如,如果租户名称是 contoso,请将 URL 设置为 https://contoso.b2clogin.cn/contoso.partner.onmschina.cn/oauth2/authrespFor example, if your tenant name is contoso, set the URL to be https://contoso.b2clogin.cn/contoso.partner.onmschina.cn/oauth2/authresp.
  10. 选择“提交”(submit)。Select 提交 (submit).

将微博帐户配置为标识提供者Configure a Weibo account as an identity provider

  1. 以 Azure AD B2C 租户的全局管理员身份登录 Azure 门户Sign in to the Azure portal as the global administrator of your Azure AD B2C tenant.
  2. 请确保使用包含 Azure AD B2C 租户的目录,方法是单击顶部菜单中的“目录和订阅筛选器”,然后选择包含租户的目录。Make sure you're using the directory that contains your Azure AD B2C tenant by clicking the Directory and subscription filter in the top menu and choosing the directory that contains your tenant.
  3. 选择 Azure 门户左上角的“所有服务”,搜索并选择 Azure AD B2CChoose All services in the top-left corner of the Azure portal, search for and select Azure AD B2C.
  4. 选择“标识提供者”,然后选择“添加”。Select Identity providers, and then select Add.
  5. 提供“名称”。Provide a Name. 例如,输入“微博”。For example, enter Weibo.
  6. 选择“标识提供者类型”,选择“微博 (预览版)”,并单击“确定”。Select Identity provider type, select Weibo (Preview), and click OK.
  7. 选择“设置此标识提供者”,然后输入你之前记录为“客户端 ID”的应用密钥,并输入你记录为之前创建的微博应用程序的“客户端机密”的应用机密。Select Set up this identity provider and enter the App Key that you recorded earlier as the Client ID and enter the App Secret that you recorded as the Client secret of the Weibo application that you created earlier.
  8. 单击“确定”,并单击“创建”以保存 Weibo 配置。Click OK and then click Create to save your Weibo configuration.