How to Setup Firebase SMS Authentication

Secure passwordless authentication and user registration globally by configuring Google Firebase SMS OTP services.

10 min read·Updated May 30, 2026
How to Setup Firebase SMS Authentication

Google Firebase SMS Authentication enables high-speed, secure OTP (One-Time Password) delivery globally. By integrating Firebase, your WordPress site can securely authorize user logins, passwordless sign-ins, and registration verification flows without relying on traditional expensive SMS API gateways. Wawp integrates the modern modular Firebase Web SDK directly into your site, handling tokenizations and security checks entirely on the client side.

INFRASTRUCTURE IMPACTBUSINESS IMPACT & ROI

Outbound Delivery Reliability: Firebase SMS boasts an industry-standard 99.9% global delivery rate, ensuring customer authentication OTPs arrive on target mobile devices in under 5 seconds. Zero Gateway Maintenance Fees: Utilizing Firebase’s generous free tier of 10,000 monthly SMS verifications saves WooCommerce merchants $500 to $1,200 annually in outbound transactional gateway fees.


The Firebase Accounts Dashboard Table

Firebase Accounts Dashboard Table UI
Firebase Accounts Table

The central control dashboard in Wawp displaying all connected Firebase accounts, their Project IDs, and active status indicators.

Keywords: firebase accounts table, dashboard settings, sms gateways

Manage all connected Google Firebase accounts in one central view under Wawp > Senders > Firebase SMS Authentication.

1. Default Sender Switch

  • ✓ Selected (Active Badge): Highlights the Firebase account currently active for your site's global OTP dispatches.
  • Set Default (Action Button): Assigns the selected Firebase profile as the main gateway in the Wawp database and automatically redirects all outgoing SMS queues through this configuration.

2. Account Name & Details

  • Displays your custom friendly identifier label (e.g., "Main OTP Project").
  • Displays the corresponding Google Project ID in monospace formatting underneath.

3. System Status

  • ✓ Active (Green Check): The credentials are fully validated and ready for outbound delivery.
  • ◷ Pending Setup (Amber Clock): The credentials have been saved but have not yet passed real-time OTP validation.

4. Row Actions

  • Edit & Test: Launches the Slide-Out Setup Sheet Wizard to update saved credentials or perform verification checks.
  • Delete (Trash Icon): Wipes out the saved Firebase configuration from the WordPress database. A verification prompt appears to protect against accidental deletions.

Step-by-Step Google Firebase Console Setup

To connect Firebase with Wawp, you must first register your website as an application inside your Google Firebase Developer Console:

Step 1: Create a Firebase Project

  1. Open the Google Firebase Console.
  2. Click the Add Project button.
Create Firebase Project Button UI
Create Firebase Project Button

The Google Firebase Developer Console home page highlighting the Add Project button to create a new workspace.

Keywords: add project button, firebase console home, new project creation
  1. Enter a project name (e.g., "Wawp Web OTP") and accept the terms of service.
Enter Project Name field
Firebase Project Name Field

Typing your customized project nickname and agreeing to Google Developer terms of service.

Keywords: project name, developer console terms, naming project
  1. Click Continue. You can choose to enable or disable Google Analytics (Wawp supports both).
  2. Click Create Project and wait for the workspace dashboard to load.
Creating Firebase Project Progress Panel
Creating Project Progress Indicator

The automated project setup progress bar confirming your Google Workspace resources are being initialized.

Keywords: creating project, resources initialization, setup progress

Step 2: Enable Phone Authentication & Add Authorized Domains

Firebase blocks SMS delivery until the Phone sign-in provider is explicitly enabled and your website domain is authorized:

  1. In the Firebase left sidebar, click on Build and select Authentication.
  2. Click Get Started, then navigate to the Sign-in method tab.
Authentication Sign-in Method Panel
Authentication Sign-In Providers

The Firebase Authentication providers tab showing options to configure email, phone, and social login gateways.

Keywords: sign in methods, authentication providers, mobile login gate
  1. Under the Additional providers list, click on Phone.
Additional Sign-In Providers Phone option
Select Phone Provider

Finding and clicking the Phone sign-in option under the additional providers panel.

Keywords: select phone provider, authentication list, additional provider options
  1. Toggle the Enable switch to active.
Enable Phone Provider Toggle switch
Enable Phone Sign-in

Toggling the enable switch to activate the Firebase Phone authentication handler.

Keywords: enable phone auth, toggle switch, mobile validation gateway
  1. (Optional) You can configure testing phone numbers and verification codes to bypass SMS costs during local staging checks.
  2. Click Save.
Save Button in Phone Provider setup
Save Phone configuration

Clicking the Save button to confirm enabling the Phone provider in Firebase console.

Keywords: save settings, phone authentication save, active provider settings
  1. Navigate to the Settings tab at the top of the Authentication page.
  2. Select Authorized domains from the sub-menu on the left.
Authorized Domains sub-menu and button
Authorized Domains configuration panel

The settings panel for authorized domains highlighting the Add Domain button.

Keywords: authorized domains, whitelist domain, recaptcha validation
  1. Click Add domain, enter your website's actual domain name (e.g., yourdomain.com), and click Add to authorize it to request SMS verifications and load the security reCAPTCHA.
Authorized Domains list with added domain
Whitelisted domains list

The updated authorized domains list showing your primary domain successfully whitelisted in Firebase.

Keywords: added domain, whitelisted primary domains, verification security check

Step 3: Register a Web App to Retrieve SDK Keys

To allow your WordPress site to call the Firebase SDK, you must register a virtual Web App:

  1. Go to the Firebase Project Overview dashboard.
Firebase Project Overview Dashboard
Firebase Overview Dashboard

The core Firebase Project Dashboard displaying app analytics, hosting services, and project management controls.

Keywords: firebase dashboard, project overview, developer tools
  1. Click the Web (</>) icon under your project title.
Web app registry icon under title
Register Web App Icon

Clicking the web application registry icon to begin adding your website as a client application.

Keywords: register web application, api credentials generation, clients integration
  1. Enter an App Nickname (e.g., "Wawp WordPress Portal"). Leave the "Firebase Hosting" option unchecked.
App nickname input field
Enter Web App Nickname

Inputting your customized application label and leaving the hosting option disabled.

Keywords: web app registration form, app nickname, configuration settings
  1. Click Register App.
  2. Firebase will display a code block containing const firebaseConfig. Copy the exact parameter values to paste into Wawp.
Firebase Config code block display
Firebase Config Web SDK parameters

Copying the generated config block containing critical project authentication and backend credentials.

Keywords: firebase config object, web sdk configuration parameters, api keys collection

SDK Credentials to Copy:

  • apiKey: A long alphanumeric string.
  • projectId: The unique slug identifying your Google project.
  • authDomain: Usually your-project-id.firebaseapp.com.
  • appId: Web App identification sequence (formatted as 1:xxxxx:web:xxxxx).
  • storageBucket: your-project-id.appspot.com.
  • messagingSenderId: A unique numerical sequence.
  • measurementId: Google Analytics tracking ID (optional).

Critical Configuration Requirements

Authorized Domains Configuration (Mandatory) Firebase blocks all authentication calls, reCAPTCHA renderings, and SMS triggers originating from domains that are not explicitly whitelisted.

  1. In your Firebase Console, go to Build > Authentication > Settings tab.
  2. Select Authorized domains from the sub-menu.
  3. Click Add domain.
  4. Enter your WordPress website's actual primary domain (e.g., yourdomain.com).
  5. Click Add.

Plan Upgrading: Spark vs Blaze Plan

  • Spark Plan (Free Tier): Provides 10,000 free SMS verifications per month globally. However, Google enforces strict daily quotas and blocks SMS delivery to certain high-cost regions under free tiers.
  • Blaze Plan (Pay-as-you-go Upgrade): Highly recommended. Transiting your Firebase project to the Blaze plan removes regional blocks and ensures reliable OTP delivery globally.
  • Billing Details: Upgrading to Blaze does not charge you automatically. You still receive the 10,000 free monthly SMS credits, and you will only be charged if your site exceeds this quota.

Wawp Settings Sheet Configuration

Once your Firebase Web App credentials are saved, input them into Wawp to establish the connection:

  1. Click Add Account or Edit & Test in the Firebase Accounts panel.
  2. Account Friendly Name: Enter a reference name (e.g., "Default Firebase Sender").
  3. Paste the credentials copied from your Firebase Console Web App config:
    • API Key (Web SDK)
    • Project ID
    • Auth Domain
    • App ID
  4. Expand the advanced settings separator to fill optional metrics if needed:
    • Storage Bucket
    • Messaging Sender ID
    • Measurement ID
  5. Click Save in the settings sheet footer.
Wawp Settings Sheet configuration fields filled
Wawp Settings Sheet Setup

Typing your copied Firebase SDK credentials and configuration parameters into the Wawp settings panel.

Keywords: wawp settings panel, firebase configuration form, api credentials input

Real-Time Client-Side Verification Sandbox

Wawp features a built-in phone verification sandbox in the setup sheet to validate your credentials before setting the account live:

  1. Locate the Account Validation Test card at the bottom of the settings sheet.
  2. Under the Enter phone for test field, use the interactive phone country-code selector and type a physical phone number you have access to.
  3. Click the Send (Airplane Icon) button.
Real-time client-side verification sandbox view
OTP Verification Sandbox Panel

The validation test component in Wawp for testing live SMS deliveries and verifying Firebase configurations.

Keywords: phone verification test, otp sandbox validation, live test sandbox
  1. Under the Hood Handshake: Wawp loads the client-side Google Firebase SDK, generates an invisible reCAPTCHA challenge inside the browser admin session to prevent bots, and triggers signInWithPhoneNumber() with your credentials.
  2. If the handshake is correct, you will receive an SMS containing a 6-digit verification code.
  3. A Verification Code (OTP) input field will appear in Wawp. Enter the 6-digit code.
  4. Click the Verify button.
  5. Upon successful validation, Wawp calls its backend REST API (/accounts/firebase/validate) to verify the handshake, update database status flags, and toggle your account to Active status.

Firebase SMS Error Codes & Solutions Reference

If an OTP fails to send or verify during testing, check the admin dashboard warnings or web console logs for the following Firebase-specific error codes:

Error CodePotential CauseImmediate Solution
auth/unauthorized-domainYour WordPress site domain is not whitelisted.Go to Firebase Console > Authentication > Settings > Authorized Domains and add your primary domain name.
auth/invalid-phone-numberThe phone number was entered in an invalid or unsupported format.Ensure the number includes the country code prefix without leading + or 00 symbols (e.g. use 201111111111).
auth/captcha-check-failedThe reCAPTCHA security verification challenge failed.Double-check that your Web SDK apiKey in Wawp matches the Firebase Console exactly, and ensure your admin dashboard loads over secure HTTPS.
auth/quota-exceededThe project has exceeded its free daily or monthly SMS limits.Go to your Firebase console and upgrade your project billing structure to the Blaze (Pay-as-you-go) plan.
auth/billing-not-enabledSMS delivery to this country or region requires an active billing account.Upgrade to the Blaze Plan. This allows sending to high-tariff regions while retaining your monthly free tier credits.
auth/invalid-verification-codeThe 6-digit OTP code entered into the verification input is incorrect.Doublecheck the SMS received on your device and enter the exact 6-digit sequence before the session timer expires.
auth/session-expiredThe SMS verification session has timed out.Click the Change number or resend link in Wawp, re-enter the phone number, and trigger a new verification SMS.
Share this article:

Did this page help you?
100% found this article helpful (0 likes)