Documentation

Migrate from Firebase / SMS OTP

Replace Firebase Phone Auth or SMS OTP with Shernova missed-call verification — step-by-step for Egypt and MENA apps.

This guide covers migration steps only — not Firebase setup or removal of other Firebase services.

Overview

Firebase Phone Auth sends SMS OTP. Shernova uses missed-call verification. Users call a number instead of entering a code.

FirebaseShernova
firebase_auth.verifyPhoneNumber()Shernova.verifyPhone() or REST API
SMS OTP code inputCall gateway number + auto poll
Firebase project + SHA keysShernova app + pk/sk keys + SHA256 register
Firebase billingShernova credits per verification

Step 1: Create Shernova account & app

Register at shernova.com, create application, save pk_live_, sk_live_, webhook secret.

Step 2: Register Android signature

Use the same SHA256 you registered in Firebase (Play App Signing or release keystore). POST /v1/apps/:id/android-signatures.

Step 3: Add Flutter SDK

Remove firebase_auth phone verification calls. Add shernova_core package. Initialize with Shernova.init().

Step 4: Replace verification UI

Before (Firebase)
// Firebase Phone Auth — remove this flow
await FirebaseAuth.instance.verifyPhoneNumber(
  phoneNumber: phone,
  verificationCompleted: (credential) { … },
  verificationFailed: (e) { … },
  codeSent: (verificationId, forceResendingToken) { … },
  codeAutoRetrievalTimeout: (verificationId) { … },
);
After (Shernova)
final session = await verifyPhone(
  context: context,
  phoneNumber: phone,
);
if (session.status == 'verified') {
  // user verified — proceed with sign-up/login
}

Step 5: Server-side token validation

If you previously verified Firebase ID tokens on your backend, switch to trusting Shernova webhook verification.completed or poll GET /v1/verifications/:id with your secret key.

Step 6: Configure webhook

Set HTTPS webhook URL to receive signed completion events. See Webhooks.

Step 7: Test & cut over

  1. Test in staging with trial credits
  2. Verify webhook signature validation on your server
  3. Roll out app update removing Firebase phone flow
  4. Monitor sessions in dashboard