在 Identity Platform 上使用電話號碼登入使用者帳戶
本文說明如何使用 Identity Platform,透過電話號碼登入使用者帳戶。
事前準備
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
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
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
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
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
- 啟用 Identity Platform。如要瞭解如何操作,請參閱快速入門導覽課程。
前往「Identity Providers」(識別資訊提供者) 頁面。
在「Identity Providers」頁面上,按一下「Add a provider」。
在「Select a provider」(選取提供者) 清單中,選取「
Phone」(電話)。將「Enabled」(已啟用) 切換為開啟。
如要儲存提供者設定,請按一下「儲存」。
Apple 平台:
- 為 Firebase 專案啟用電話號碼登入功能。
- 啟用無聲推播通知,驗證應用程式。
如需操作說明,請參閱「在 Apple 平台上使用電話號碼透過 Firebase 驗證」。
Android 平台:
- 為 Firebase 專案啟用電話號碼登入功能。
- 使用 Play Integrity API 啟用應用程式驗證。
如需操作說明,請參閱「使用電話號碼在 Android 上透過 Firebase 進行驗證」。
網頁平台:
- 為 Firebase 專案啟用電話號碼登入功能。
- 設定 reCAPTCHA 驗證器。
如需操作說明,請參閱「使用 JavaScript 透過手機號碼向 Firebase 進行驗證」。
- 瞭解如何註冊測試電話號碼,以供開發用途。
為 Identity Platform 啟用手機登入功能
為應用程式平台設定手機登入功能
如果您使用 Identity Platform for Apple、Android 或網頁平台,也必須透過 Firebase 控制台設定應用程式。