使用 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 public 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 sign up 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 selecting the Directory + 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, then select Weibo (Preview).
  5. 输入“名称” 。Enter a Name. 例如,Weibo 。For example, Weibo.
  6. 对于客户端 ID,输入你之前创建的 Weibo 应用程序的应用密钥。For the Client ID, enter the App Key of the Weibo application that you created earlier.
  7. 对于客户端密码,输入你记录的应用机密。For the Client secret, enter the App Secret that you recorded.
  8. 选择“其他安全性验证” 。Select Save.