Upgrade to production mode

This page describes how to use Firebase Phone Number Verification with your Android app in production. See the Get started on Android guide to learn how to test Firebase PNV in an Android app using SIM-less test mode.

Once production mode is active, your app will be able to get verified phone numbers on real devices, as long as they have supported hardware and a supported carrier.

Before you begin

  • Implement and test the Firebase PNV user flow and backend integration by following the steps in the Get started on Android guide.

  • You must be signed into the Firebase console as a project member with Owner privileges on the app's Firebase project.

  • You must have a publicly accessible privacy policy to complete OAuth brand verification. You can use Firebase Hosting to create a basic web app to host your privacy policy.

1. Disable test mode in the app client

To disable testing mode, remove the following line from the Firebase PNV library initialization code:

Kotlin

fpnv.enableTestSession(/* token */)  // Remove this.

Distribute the app compiled with that line removed as your production client. You can continue to create non-public development builds of your app client that include the enableTestSession() line.

Note that phone number verification won't work in production until you also complete the steps in the next section.

2. Enable production in your project

Follow these steps to enable Firebase PNV production mode for your Firebase project:

  1. Configure API restrictions for the Firebase Phone Number Verification API.

    1. In the Google Cloud console, go to the APIs & Services > Credentials page

    2. Open your Android API key and add the Firebase Phone Number Verification API to the list of selected APIs.

  2. If you haven't already, set up billing.

    Firebase PNV requires the pay-as-you-go Blaze pricing plan. If you haven't yet upgraded your project to the Blaze pricing plan, you'll be prompted to during set up of production mode.

    Although Firebase PNV requires a billing account to be linked to your Firebase project, during the preview phase, you won't be billed for the service.

  3. If you haven't already, specify your app's SHA-256 fingerprint.

    1. In the Firebase console, go to the Settings > General tab.

    2. Scroll down to the Your apps card, select your Android app, and add your SHA-256 fingerprint in the SHA certificate fingerprints field.

    Refer to Authenticating Your Client for details on how to get your app's SHA-256 fingerprint.

  4. Upgrade to production mode.

    1. In the Firebase console, go to the Security > Phone Verification > Production tab.

    2. Click Upgrade to production.

      You'll see a list of the apps in your project that will be enabled for production, and have the opportunity to add additional apps.

    3. You must submit your app for OAuth brand verification and a privacy policy review. Google Cloud will verify that you are clearly and accurately identifying your app and its privacy policy.

      To begin the review, click Proceed in Google Cloud. This process can sometimes take 24 hours or more.

    4. While you're waiting for brand verification, review the Firebase Phone Number Verification service specific terms, which are linked to from the Firebase console.

    5. After you've passed brand verification, check the box to acknowledge the service specific terms, and then click Enable.

      Firebase Phone Number Verification is now active in production mode.