Skip to main content
The Firebase integration enables multiple authentication methods while maintaining a consistent user identity.

How it works

FunnelFox authenticates users directly within your funnels, giving each user a stable Firebase UID (FUID). It will either:
  • Create a new Firebase user (sign up): If no user exists for the customer’s credentials.
  • Authenticate an existing Firebase user (sign in): If the user was created during a previous funnel experience and signs in using an OAuth button or by entering their email. New purchase is recorded in the existing Adapty or RevenueCat profile.
Once the user is authenticated, your app takes over the in-app authentication flow. The email entered by the customer (via Email input or OAuth) is saved as the {{email}} funnel variable. You can use it in upstream screens, for example, in deep links.

Email & Password authentication

Email-based authentication occurs when the customer navigates from the authentication screen with email/password inputs filled out. Sign up: When a customer submits their credentials in a funnel, FunnelFox automatically handles Firebase user creation:
  • FunnelFox creates a Firebase user via Email/Password authentication.
  • By default, a secure random password is generated for the user.
  • If the same screen includes a Password input element, that value replaces the generated password.
For the Email/Password sign up, we recommend using the Password input element. If you rely on the generated random password, it won’t be accessible to the user, so you’ll need to implement a password reset flow during the in-app authentication step.
Sign in: Email-based sign in works through the same Email input, but requires the Service account key to be uploaded to FunnelFox. When a customer enters their email, FunnelFox checks whether a Firebase user already exists for that address:
  • If a Firebase user exists, FunnelFox recognizes the customer as returning, signs them in using their Firebase UID (FUID), and fires the profile.updated webhook.
  • If no Firebase user exists, FunnelFox treats the customer as new and creates a Firebase user (sign up).
FunnelFox doesn’t check the password during sign in. It only verifies whether the email already belongs to a Firebase user.
To find the customer, FunnelFox first checks its own records for a profile that already stores an FUID. If none is found, FunnelFox requires the Service account key to look the customer up directly in Firebase. The new purchase is then recorded in the existing Adapty or RevenueCat profile linked to that FUID.

OAuth authentication

Unlike email/password authentication, OAuth works right when the customer uses the OAuth button. OAuth providers enable seamless social authentication within your funnels:
  • Enable OAuth providers (e.g., Google or Apple) in Firebase and add OAuth buttons in the Editor.
  • Users receive a secure and seamless authentication experience:
    • If it’s the user’s first time, Firebase creates the account.
    • If the account already exists, Firebase signs them in using the same OAuth buttons and FunnelFox fires the profile.updated webhook.
FunnelFox automatically tracks OAuth button interactions. When a customer taps an OAuth button, FunnelFox sends an auth_button_clicked event, followed by auth_success or auth_fail depending on the result. Learn more in the events reference.

Unified identity (FUID)

Firebase UID becomes the canonical identifier across all integrated services:
  • The user’s Firebase UID (FUID) serves as their primary identifier.
  • When other integrations are enabled, FunnelFox forwards this ID automatically:
If a customer makes a purchase while signed in within the funnel, the new purchase is recorded in the existing Adapty or RevenueCat profile.

Setup

Complete the Firebase integration by creating a Firebase project, configuring authentication methods, and connecting it to FunnelFox.

1. Create Firebase Project

Start by setting up a new Firebase project in the Firebase console.
  1. Go to the Firebase console and start creating a new Firebase project.
  2. Name your project.
  3. Configure Google Analytics.
  4. Click Create project.

2. Configure Firebase Authentication

Enable Firebase Authentication to configure your preferred sign-in methods.
  1. In your Firebase project, go to Build > Authentication.
Authentication
  1. Click Get started.
Follow the steps below to set up your sign-in methods.

3. Configure sign-in methods

Select a provider to configure under the Sign-in method in Firebase. Once done, click Add new provider to set up another one.
The Email/Password method allows users to sign up using their email address and password.
  1. Click Email/Password in the Native providers.
  2. Toggle on Email/Password.
  3. Click Save.
Email/Password

4. Register Your App in Firebase

Register your web app in Firebase to obtain the configuration values needed for FunnelFox integration.
  1. Go back to your Firebase project.
  2. Click the settings gear icon at the top left and select Project settings.
Project settings
  1. Select the web icon under Your apps.
Web app
  1. Add your app nickname.
  2. Click Register app.
You will see the config required for the next step.
Config

5. Connect Firebase to FunnelFox

Complete the integration by adding your Firebase configuration to FunnelFox.
  1. Go to Integrations > Firebase in FunnelFox.
  2. Toggle on Firebase.
  3. Copy the config values from Firebase project and paste them in FunnelFox using the following mapping:
Firebase Config ValueFunnelFox Field
apiKeyFirebase API Key
authDomainFirebase Auth Domain
projectIdFirebase Project ID
  1. Click Save changes.
Config copied
You successfully integrated Firebase! Add the authentication methods you’ve set up to your funnels in the Editor.

Service account key

The service account key lets FunnelFox look customers up in Firebase. It’s required for email sign in to work reliably. With the key, FunnelFox can find a customer in Firebase even when:
  • The customer exists in FunnelFox with an email only, and no FUID is stored in their profile.
  • The customer exists in Firebase but not yet in this FunnelFox project.
To upload the key to FunnelFox:
1

Generate a private key in Firebase

  1. Go to Settings > Service accounts in the Firebase console.
  1. Click Generate new private key.
  1. Confirm the download. The JSON file with the key is created and downloaded within a few seconds.
2

Upload the key to FunnelFox

Go to Integrations > Firebase in FunnelFox. Upload the JSON file using the Service Account Key field, then save changes.

Multi-project setups

If you run multiple FunnelFox projects integrated with the same Firebase project, the service account key lets a customer use email sign in even when they were originally created in a different FunnelFox project. In this case, FunnelFox:
  1. Looks the customer up in Firebase.
  2. Creates a new profile in the current project, since the customer didn’t exist here before.
  3. Signs in the same Firebase customer by FUID.
  4. Records the purchase in the same Adapty or RevenueCat profile.
Both FunnelFox projects must be integrated with the same Firebase project for this to work.

Add authentication to funnels

Once Firebase is configured, you can add authentication flows to your funnels in the Editor. The following authentication methods correspond to the ones you’ve set up in Firebase. The same OAuth buttons serve both authentication methods: sign up and sign in.

Email/Password authentication

Enable users to authenticate with their email address and custom password. To add Email/Password authentication to your funnel:
  1. In the Editor, prompt the AI Chat to add a screen for user registration with both Email and Password inputs. Or go to Add element > Inputs and add these inputs manually.
  2. Set the Custom ID to firebase-password for the Password input.
By default, FunnelFox generates a random password when a user submits their email in the funnel. It’s important to add the Password input on the same screen to replace the previously generated password with the one provided.
Password ID

OAuth authentication

Enable seamless OAuth authentication using Google or Apple accounts for a frictionless user experience. To add OAuth authentication to your funnel:
  1. In the Editor, prompt the AI Chat to add a screen for user registration with OAuth button or use the one you’ve already added for Email/Password. Or click Add element > Authentication and select OAuth button.
  2. Go to the Parameters tab of the OAuth button.
  3. Select OAuth provider.
  4. Under Actions, set up user navigation for cases when authentication succeeds or fails.
Learn more about setting up navigation actions.