The Wayback Machine - https://web.archive.org/web/20250218184520/https://www.reddit.com/r/Firebase/
Skip to main content
r/Firebase icon

r/Firebase

members
online

Is there a better option than Google Firebase for this? Is there a better option than Google Firebase for this?
Cloud Messaging (FCM)

I've been using the Firebase services for my main application, and it's been working good until now. It's an app for a disaster prevention company, so reliability and communication speed are 100% the most important aspects of basically anything in the app. The app uses Firebase Auth and Firestore for user data and account management, and Functions and Messaging together with Google Maps API for communication among the team members. Alerts are sent through Messaging and it's really important that they arrive every time, as fast as possible. However, 2 new users joined and they both have new Huawei phones. They can't open the map and the Messaging service is also a lot more unreliable and slower.

My question is, do you know of another service like Firebase that i could replace it with, that is just as or more reliable and fast? Or should i stick to Firebase and tell Huawei users to download the app through GBox? (Note: It needs to work on Android, Huawei and also iPhone. I have around 40 current users that would need their data transfered if i switch, but if there's something better, it would be worth the work.)


Introducing Fuego: A Powerful Desktop Client for Firestore & Firebase Auth 🚀 Introducing Fuego: A Powerful Desktop Client for Firestore & Firebase Auth 🚀
General

Hey everyone,

After months of work, I'm finally ready to share Fuego with you! It's a desktop client for managing Firebase Auth and Firestore with ease.

We've been using it at the company where I work since the first version, and many of its features come from real needs we face every day. Fuego was built to simplify our workflow, complementing our backend and making Firestore data management smoother. Here's what it offers:

🔥 Key Features:

  • Multi-database support

  • Real-time Firestore data

  • Multi-tenant support for Firebase Auth (because Google's UI is... well, not great)

  • Import/export users (including passwords) with all supported algorithms

  • Import/export entire Firestore collections & subcollections

  • Inline editing + Monaco editor (yep, the same one from VS Code)

  • Background operations: move/copy data between projects & DBs, bulk document edits (add/remove/modify fields, convert formats, etc.)

  • Emulator support

  • Customizable dashboards

  • Advanced query builder with OR support

  • Image & GeoPoint preview

🔥 Adding projects is easy:

  • Import a JSON certificate

  • Authenticate via Google

  • Use ADC (Application Default Credential) with gcloud CLI

🔥 Coming soon:

  • Firebase Storage support

  • Byte & vector data support

  • Firestore index management

🔥 Future plans:

  • Data Connect

  • Genkit (AI-powered tools)

Would love to hear your thoughts! If you're working with Firebase daily, I think you'll find this super useful. Let me know what you think! 🚀

Currently, Fuego is available for MacOS (Apple Silicon and Intel), and releases for Windows and Linux are coming soon.

For Reddit readers: if you'd like to try it free, reach out to me and I'll be happy to send you a license key for free (I don’t have a waiting list 😅)!

Additionally, Fuego has a free version (no license required) that allows for a single project with limited features.

➔ Share your feedback in the comments or write me a email

➔ Follow Fuego on X / twitter to get project updates

➔ Info https://fuegoapp.dev

Cheers 👋


Help understanding the remote config conditional values Help understanding the remote config conditional values
Remote Config

Hi,

I've set up a flag on the remote config a while back where I wanted to randomly split the boolean flag between users with a 50/50 distribution.

However the numbers that I am seeing are not reflecting the 50/50 split and I an wondering where I went wrong.

https://preview.redd.it/help-understanding-the-remote-config-conditional-values-v0-mvn8skwz9xje1.pnghttps://preview.redd.it/help-understanding-the-remote-config-conditional-values-v0-1kdfg6m1axje1.pnghttps://preview.redd.it/help-understanding-the-remote-config-conditional-values-v0-fbz0ooc3axje1.png

Can anyone shed some light on what is going on? I would expect to see the variant splits be closer to 50/50.

Thanks


Any recommended guides for beginner that wants to deploy a Phaser app to Firebase? Any recommended guides for beginner that wants to deploy a Phaser app to Firebase?
General

I have been developing a card game and it is built using Phaser. I tried deploying to Digital Ocean but it does not work properly. So now I am trying to use Firebase, I saw it in my IDX workspace and linked to my Firebase account. I tried deploying to a channel but the custom login I made did not work. So I think I need to learn the Firebase intergration for Login and other setup for database to store user's details, progress and inventory. Please help me navigate this Firebase journey. Thank you in advance!


Unable to load dynamic library 'FirebaseCppApp-11_8_0' ... not found Unable to load dynamic library 'FirebaseCppApp-11_8_0' ... not found
Realtime Database

Having this issue pop up when I am building for Android from Unity, specifically a quest 2. App was working perfectly until I needed to downgrade my Android API from 33 to 32 to meet the oculus store requirements.

I have no idea what caused it or what to do to fix it. I have downloaded the newest version of the firebase SDK and tried multiple versions of android with no luck. It is a known issue online but I haven't found a fix that works for me yet. I really need to get this app on the oculus store but I can't connect to my database because of this error. Works fine in windows editor.

Please let me know if there is anything I can do to fix this. Thank you in advance!


How Environments and deployment work? How Environments and deployment work?
Tutorial

I have a firebase project (web app using React with typescript) that i have developed for some time and it’s almost ready to get in the hands of clients. Before this i want to automate my deployment process and handle environment variables properly. For example, i have 3 environments:

.env.local = emulator (same as dev tho) .env.development = firebase config for my dev firebase project .env.production = actual config values for prod

Ideally i want to use hosting and GitHub actions to handle the two cases:

When i make a PR, i want a preview channel using my dev db

When i merge it into main i want it to deploy to prod and use that db configs.

For some reason when i build it uses production and when i do like ‘npm start’ it’ll use dev. That’s cool but i cannot wrap my head around what decides that? Like how do i tell firebase and my project which environment to use? And would it pull properly?

Also in my case these .env files do not have any sensitive database so when i deploy, do they just get put into the public directory?

Basically im just stuck idk what resources to check. Can someone help me understand and link me to some helpful resources?

Extra: i know this will somewhat happen in the package json file scripts, i have never been able to find out where people learn how to use those like is there a resource i can look at to understand that ?

Thank You for reading and have a great day.


Seeking a little advice/help direction if you wouldn't mind please. Seeking a little advice/help direction if you wouldn't mind please.
General

I am coming from a background using SQL for any database needs I've had. Recently I decided to make a daily sports statistics app for myself and friends to use. After some research I landed on trying to use Flutterflow for a low code design. In making that choice I was lead towards Firestore as a database. Knowing it's a noSQL database I'm needing to learn from scratch basically. I know that structuring my schema I need to put a lot of thought into how I'll be retrieving my data as to optimize the efficiency of the app. I guess my questions are, would I need to have references built into each document if I plan to have a previous page point to a subsequent page? Would it be smarter to have each document contain every stat I'll be using for each player for each team? This will need to be updated daily so the fastest way I can see to do so would be with CSVs and run a script to upload them. Would I be better off using firebase data connect over Firestore?

https://preview.redd.it/seeking-a-little-advice-help-direction-if-you-wouldnt-mind-v0-46jb88kcttje1.png

This is somewhat the reference points I'll need on a daily changing document. I'll be building this for all major sports in the US as well as every major college sport.

Thank you for any help and or guidance



Como dar update no realTime firebase?? Como dar update no realTime firebase??
Realtime Database

Seguinte...

Tenho no banco uma sessão chamada user, e dentro dela tem seus filhos com suas respectivas keys. Essas keys foram geradas pelo próprio firebase usando a função "set".

O que eu quero fazer? No meu front tenho uma aba onde o usuário pode recuperar sua senha, onde ele simplesmente coloca seu usuário e nova senha. Então, assim que ele colocar seu usuário, vou ter uma função onde verifica se esse user é existente, se sim, pego o id responsável por esse user.

Feito essa captura, eu quero dar update somente na propriedade password exclusivamente daquele Id, sem mexer no nó pai ou filhos.

const updateUser = async function() {

        try {
            const usersRef = dbref(database, "/users")
            const userQuery = query(usersRef, orderByChild("userName"), equalTo(inputUser.value))
            const userSnapshot = await get(userQuery)
          
            if(userSnapshot.exists()) {
                const userId = Object.keys(userSnapshot.val())
                const userRef = dbref(database, `/users/ ${userId}`)
                console.log(userId)

                update(userRef, {
                    password: inputNewPassaword.value
                }).catch((error) => {
                    console.log(error)
                })
            }
        } catch (error) {
           console.log(error)
        }
    }

Problema: Por algum motivo na minha função kkk, ele replica o id salvo do snapshot e replica no banco usando a senha nova kkk. E outra, ele pega somente o filho principal [0], quando é digitado outro usuário filho, esse valor não pego de jeito nenhum

Ex.: No banco está algo assim..

Algo como: -OIqQjxWw2tBp3PyY8Pj

-password: content

-userName: content

Desde já agradeço pela ajuda...



Firebase Editor Role & API Key Exposure – Do I Need to Regenerate? Firebase Editor Role & API Key Exposure – Do I Need to Regenerate?
Security

I granted a developer Editor access to my Firebase project. During the early stages of development, they pushed the Firebase API key to a public GitHub repository. 1. Do I need to regenerate the key later, or can I leave it as is? 2. If I don’t regenerate it, can the developer (or anyone who finds the key) harm my app or steal its data?

I’m new to coding, so I’d appreciate any insights. Thanks!


Firebase Refresh Token Doesn't Expire – Security Concern Firebase Refresh Token Doesn't Expire – Security Concern
Security

I have a web application that uses Firebase OAuth (Google login) for authentication. On the frontend, I use the React Firebase client-side SDK for authentication. After logging in, the Firebase ID token is sent to my Spring Boot backend, where it is verified. Subsequent API requests include this ID token for authorization.

Recently, I discovered that the Firebase refresh token does not expire. If a bad actor manages to extract the refresh token—either from the response of the API call (https://identitytoolkit.googleapis.com/v1/accounts:signInWithIdp?key=xxxxx) after login or from a refresh request to (https://securetoken.googleapis.com/v1/token?key=xxxx)—they could potentially generate new ID tokens indefinitely by repeatedly calling the refresh API.

Is this a valid security concern? If so, what measures can I take to mitigate this risk?

Would appreciate any insights. Thanks!


Firebase Analytics - event logging mismatch Firebase Analytics - event logging mismatch
React Native
Firebase Analytics - event logging mismatch

Hi Everyone,

TL;DR: Our firebase analytics only show around HALF of the events that occurred, according to data from our database. In the previous native apps, the events were logged correctly and match with the database.

Full explanation:

We have a React Native app that primarily exists to let users scan and upload documents. We use Firebase Analytics to track and log custom events, such as image_capture and document_upload.

Now, both of these custom events have been logged only half of the time, when comparing the logs to data from our database. We have double and triple checked our logic to make sure that the logEvent() function is called at correct times, I have used Firebase DebugView with the app in development mode to check it also, and I've also checked the adb logs. Everything seems to work as it should, locally.

This is the hook we have created for using analytics:

import { useGetUserInfo } from 'our-api-module';
import analytics, {
	FirebaseAnalyticsTypes,
} from '@react-native-firebase/analytics';
import { useEffect } from 'react';

export const useAnalytics = () => {
	const { data: userInfo } = useGetUserInfo();
	const setAnalytics = async () => {
		await analytics().setAnalyticsCollectionEnabled(
			userInfo?.trackAppUsage ?? false
		);
	};

	useEffect(() => {
		setAnalytics();
	}, [userInfo]);

	const logEvent = async (
		event: string,
		params?: { [key: string]: any },
		options?: FirebaseAnalyticsTypes.AnalyticsCallOptions
	) => {
		try {
			await analytics().logEvent(event, params, options);
		} catch (e) {
			console.log(e);
		}
	};

	return { logEvent };
};

And this is an example of how we are using it (we don't really use optional params anywhere, I have seen in the docs that it will fail silently with incorrect params):

export function ExampleComponent(){
   const { logEvent } = useAnalytics();

   const onUploadSuccess = () => {
	logEvent(CustomEvents.document_capture);
        //The rest of the logic follows here
   };

}

Finally, this is our firebase.json file:

{
	"react-native": {
		"analytics_auto_collection_enabled": false
	}
}

Has this happened to anyone, or do you see any indication that we are doing something incorrectly? Thank you in advance for any input!

upvotes · comment


Pricing for firebase + expo app (Freemium, Monthly, Yearly) Pricing for firebase + expo app (Freemium, Monthly, Yearly)
Billing

I’m a solo dev about to launch an expo mobile app with firebase backend and need help pricing my app to make sure it profitable

The has a few features similar to popular social media (image upload, infinite scroll of those images, chat app functionality) among other features. Additionally uses google places, maps and a few other apis.

Currently just me testing with a friend and we don’t hit the daily threshold except maybe on bandwidth if we scroll through a lot of images.

How would i extrapolate me and my friend testing extensively to that of a normal user to come up with what would be good pricing.

App has freemium model with monthly and yearly subscriptions


Best Practices for Managing Consumable IAPs with RevenueCat & Firebase Best Practices for Managing Consumable IAPs with RevenueCat & Firebase
General

Hi everyone,

I’m exploring the best practices for managing consumable token balances in my mobile app. Here’s the scenario:

  • Purchases:

    1. Subscription: Grants full access plus a set number of tokens.

    2. Consumable Tokens: Direct token purchases.

  • Current Consideration: I plan to manage token balances on my firebase backend. However, since I don’t require users to log in, a user may end up with a new user ID (e.g., after a reinstall or factory reset).

  • The Challenge: When a user with a new user ID restores their purchase using RevenueCat, I want to automatically link their restored purchase to their original user ID so they get their token balance back.

So, is it possible, and can you provide me suggestions on how to manage it?

Thanks in advance for your help!


How to delete backend from App Hosting? How to delete backend from App Hosting?
App Hosting

How on earth do you delete a backend from App Hosting?

I've deleted everything related from the artifact registry, deleted the web app in project settings and still the delete button won't do anything and in CLI I get 'Error : Failed to delete backend'.

There's also a GitHub Actions job stuck on In progress - Build queued related to this backend, but I disabled automatic rollouts. How do I end this job?

Any help will be appreciated, thanks.


Efficiently Storing Transcript Language Metadata in Firestore Efficiently Storing Transcript Language Metadata in Firestore
General

Previously, due to the 1 MB document size limitation, I had to break down transcript text into smaller chunks and store them across multiple documents. The structure looked like this:

users (Collection)
|
|-- {user_id} (Document)
    |
    |-- notes (Subcollection)
        |-- {note_id} (Document)
            |-- transcripts (Subcollection)
                |-- RZ290XHh3DD3vzavab1m (Document)
                    |-- text: string
                    |-- order: int
                |-- 8fKb3NhL2a5DXQYmZPjC (Document)
                    |-- text: string
                    |-- order: int

Now, I need to introduce a new field, transcript_language, to store the language of the transcript. Is the following design a good approach?

users (Collection)
|
|-- {user_id} (Document)
    |
    |-- notes (Subcollection)
        |-- {note_id} (Document)
            |-- transcripts (Subcollection)
                |-- metadata (Document)  <-- Fixed document ID for storing metadata
                    |-- transcript_language: string
                |-- RZ290XHh3DD3vzavab1m (Document)
                    |-- text: string
                    |-- order: int
                |-- 8fKb3NhL2a5DXQYmZPjC (Document)
                    |-- text: string
                    |-- order: int

Chat App with Firebase Chat App with Firebase
General

Hi guys, I’m working in a software project that have an angular application in the front end and in the back end, I’m using Firebase. These Firebase project have a cloud function implementation that it’s running on NodeJS with Typescript.

I must improve a new feature in my application. This feature is a chat between two kind of users: Customers and seevice providers. Please give me all the advice or recommendations to improve in the best way this feature.





Confirmation over automatic re-queries for billing Confirmation over automatic re-queries for billing
Cloud Firestore

Hopefully a quick query to address.

I read in the official documentation that if the app is terminated or if a session has been inactive for more than 30 minutes that despite if a local/non stale cache is present, the query will be recomputed and fetched directly from the server.

Can anyone please confirm, if a non-stale cache exists, will Firebase still attempt read off this after the inactivity window?

! note the below example is in reference to a live query with a listener/onSnapshot

Example: if I have a query that returns 10 documents, and it’s cached automatically by Firebase. The user is inactive for 30+ minutes, returns to the session, would Firebase either

A) re query and charge me 10 reads Or B) re-query but smartly fetch from cache if available and thus only charge me 1 read as default

I really need to know the answer to this so I can factor in my structure on advanced caching if needed.

I’ve tried analysing the Firebase usage to get an answer on this but I see inconsistent results and I need to know a definite answer to this.



RemoteConfig server updates not triggering `onConfigUpdate` firebase function RemoteConfig server updates not triggering `onConfigUpdate` firebase function
Remote Config

Hi there,

I have a firebase function that's set up to run whenever my Remote Config is updated. The function is deployed and I see the correct trigger listed in my Firebase functions page.

I use the server-side Remote Config to push updates to my server. When I edit my config in the Firebase console and then publish the changes, my `onConfigUpdated` firebase function is not triggered. I have tried editing the value of an existing parameter and creating/deleting parameters. Nothing triggers my Firebase function.

I have checked the logs in Google Cloud and verified that it is never called.

Should the `onConfigUpdated` function trigger work with server-side remote config changes? My understanding from the documentation is yes. Has anyone seen this issue before or got it working?

Thanks!

*Edit to add the npm versions I'm using:

"firebase-admin": "^12.6.0",
"firebase-functions": "^6.0.1",