I have a Firestore users doc that looks something like this: And a Firestore websites doc that looks something like this: Now I’m trying to use the VueUse useFirestore() wrapper to display the websites doc. To do that I am referencing the currentCompanyId property of the users doc inside a where Query C…
Tag: firebase
How do I add multiple documents in firebase 9 with javascript?
Their documentation only shows how to set multiple documents with batch, but I need to add new docs and doing it one by one with a loop seems like a bad solution Answer You can add a document using Batched Writes by creating a DocumentReference first as shown below: If you don’t want to use Batched Writ…
How can i check a JWT token is valid using an async function route with nodejs?
I am following the guide below to verify that only registered users can send requests to my backend nodejs server, my frontend is sending requests with an authorization header that contains a token and that part is working well. The nodejs backend should then check the token is valid before sending a response…
How to delete a single entry from my Realtime Firebase database in React Native?
I’m not quite sure how to delete a single entry in my Realtime database, each time I run the following, it deletes everything in that database: I do have the id (can see that with the console.log) and it matches what my firebase shows on the web console. But why is “remove” deleting the enti…
“Parsing Error: unexpected token function” on Async Function with a recent Node version [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 6 months ago. Improve this question I am…
How to enable multi-tab synchronization for Firebase Web Version 9 (modular)?
I am using Firebase JavaScript Modular Web Version 9 SDK. And I have enabled offline persistence as per these docs using this: enableIndexedDbPersistence(db). Now I want to keep data synced between multiple open browser tabs. I thought I could do that in the PersistenceSettings object like this: enableIndexed…
How To Render Data From Firebase Without Page Refresh
I’m creating a simple note taking app. The functionality I need is the ability to make a new LABEL, and then inside that label create a TITLE, with TAGS(notes) associated to that title. Right now I have it all working nicely, except when I submit the new label, and/or new title/tags, I need to refresh t…
Flutter/Firestore : How do I display data from doc in a ListTile?
I am new to Flutter/Firebase/Firestore etc.. so I am struggling a bit. I want to grab the data from the documents in my ‘users’ collection in Firestore and display it in my account information page. I have spent hours messing around with this and I am stuck. If anybody could help me out that would…
firebase query at same values
I have a query: Which returns all the users with all their highscores in descending order. The problem is that there are users who got the same high scores, and now they are ordered I think randomly. So for example, if 3 users get 3000 score it just randomly orders those 3. How can I for example look at anoth…
FirebaseError: Missing or insufficient permissions. with getDocs()
I tried reading the first couple of answers but none seem to have the same rule with the one I currently have my hands on. When I try to call the getDocs() function (using react) I seem to be getting the error FirebaseError: Missing or insufficient permissions. what can I do to not get this error? Below is th…