I’m trying to set user data into the realtime database. To do that I want the uid of the current user who is logged in. But when I use the firebase.auth().currentUser.uid; I’m getting the previous uid. Here’s the code: Don’t mind the (*) in the config, I just don’t want to show that information. Answer If you want to get
Tag: firebase
Firebase Admin Failed to determine project ID
I have a react app and I have added firebase to it. The Sign Up creates a new user account but since the user has to be tracked I have gotten the user’s id token and added it to local storage. It then takes the user to a dashboard page with the route link “/dashboard” but anyone can go to
How to get all the firebase data up to second from last
In my firebase, the recently or last added data has to be ubsent all the time from my table. So I want to populate the table with all the data except for the recently added data. I mean to say I have data1, data2, data3, data4. I want only data1 to 3, and 4 should be ignored. I thought I
Querying multiple collections of firestore using array-contains-any
I am trying query a number of documents in different collections with array-contains-any, by using Promise.all() to get all the documents at once. I’ve checked whether the path is correct, whether the documents exist, whether the key exists in the document and everything is ok. The querySnapshots and snapshots have no data retrieved. At some point of the log says:
Using Expo AppLoading to preload data from firebase
I am trying to use AppLoading on Expo to preload data from firebase, before the app goes to the homepage. I keep receiving an error. “Error: could not find react-redux context value; please ensure the component is wrapped in a < Provider > ” what I have tried: any help would be greatly appreciated, I am still new to React
Firestore data aggregation of documents
I’m creating an expense tracker app, where the user can set a monthly budget (ie. $3,000) and a field ‘total spending for the month’ would update each time a user adds an expense. How would I do this using Firestore Database? So far, I have the expense record stored in a subcollection inside a document (using user-id) inside a user’s
How does google firebase save users data so that every time the user logs on, the previous work they did on the website is still there? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 1 year ago. Improve this question How does google firebase save users data so that every time
Protect Web pages using password or authentication service
I would like to know if there is a way to password protect web pages developed with simple HTML/ javascript. I am hosting the web page on netlify and I have also tried hosting on Firebase and it is working from both ends but I do not want anyone with a link to be able to view and use the
Add a new image with the existing image list in firestore database
I have already two images in the firestore database, I am trying to add a new image to this list? How can I add a new image to the existing image list? Answer To add another array to the postImg, you can: Also see the Firebase documentation on adding items to an array.
Code runs after catch statement catches and error and returns in react native firebase
I am having issue whenever I catch an error and return from a function, by code after the catch block still runs. Here is my two functions that I use: I would greatly appreciate any help for this problem, as I have been struggling with it for over 2 days now and can’t seem to find a solution. Answer In