使用 Identity Platform 让用户通过手机号码登录

本文档介绍如何使用 Identity Platform 让用户通过手机号码登录。

准备工作

  1. 登录您的 Google Cloud 账号。如果您是 Google Cloud新手, 请创建一个账号来评估我们的产品在 实际场景中的表现。新客户还可获享 $300 赠金,用于 运行、测试和部署工作负载。
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  5. Verify that billing is enabled for your Google Cloud project.

  6. 启用 Identity Platform。如需了解具体方法,请参阅 快速入门

为 Identity Platform 启用手机登录

  1. 前往身份提供商 页面。

    前往身份提供方

  2. 身份提供商 页面上,点击添加提供商

  3. 选择一个提供商 列表中,选择 电话

  4. 点击 Enabled 切换开关以开启。

  5. 如需保存提供商设置,请点击保存

为您的应用平台配置手机登录

如果您将 Identity Platform 用于 Apple、Android 或 Web 平台,还必须从 Firebase 控制台中配置应用。

后续步骤