I am new to firebase / firestore and am trying to create a new collection upon login and authenticating a user, on client side and using React. I read a few other articles here and I set the db rules to true for both read and write, but yet, I keep getting an error on the Firestore db, while it
Tag: firebase
How to get users document id in Firestore using Javascript?
how to get only the last document id in Firestore? i tried the result i’m getting wrong id thats not in the orders document!! This is my documents : Answer You are running db.collection(‘users’).doc(user.uid).collection(‘orders’).doc() twice which creates 2 different DocumentReferences and hence they are different. If you are trying to get the document that you just added try this:
Firebase 9(modular sdk web ) replacement for fieldPath
I am using the below code with the Firebase SDK 8. I want to replace it code with the modular SDK. So I have written, But somehow I could not find the syntax to get the FieldPath. From the reference, I can read that, which is imported with But when I am using it, it results in an error. Does
Uncaught Error in snapshot listener: FirebaseError: no matching index found
I’m getting the above error when running the following query. I’ve not seen it before, can’t find any documentation about it, and I’m not doing anything unusual or anything I’ve not done before. Can anyone shed any light on it, please? It is a ‘new’ query in that I’ve just added it to the code, so I might expect the
Delete user using firebase Admin SDK
How do I delete a user from my admin panel using the firebase Admin SDK? I’m getting this error when trying to delete it: Uncaught (in promise) ReferenceError: uid is not defined at eval (ManageCustomer.vue?b113:262) What am I doing wrong? This is my code in index.js from functions Here is my client side code Answer You are not accessing the
_firebase_config__WEBPACK_IMPORTED_MODULE_3__.default.createUserWithEmailAndPassword is not a function in Vue Js
createUserWithEmailAndPassword function is not working for me. Below are my code – config.js useSignUp.js Tried a number of things- Delete node modules and install them again. Change the version of firebase as well Nothing working for me any solutions are appreciated. Thanks in Advance!! Answer when you importing the config.js file inside useSignUp.js you are setting the whole object as
How to get info from firebase firestore database in react-native
I am trying to get the logged-in user info from my firestore database in my react native app. I am new to react native, therefore I don’t know the correct syntax or methodology to do these things with firestore. I’ve read many documentations but they don’t provide information for every situation and instance. here is my code: my AuthProvider.js: my
Firebase .getIdToken() returns invalid token
I’m trying to make just a simple authentication app with electron and firebase redirect, but if the user is already logged in and I use the firebase.auth().currentUser.getIdToken() to get the IdToken of that user, but when i try that token in firebase.auth().signInWithCredential(credential) I get the error that says ERROR: auth/invalid-credential Here is my code front-end Here is my code back-end
How to return the document data got from firestore using .get() to another function in JS
I have a function that needs some data from firestore and I want to make another function that will get the data and return it to the function calling it The code that I’m trying: Here my logic function needs to use data that is received from the getData function Any suggestions on how to get the data in this
Count all sub child in firebase using React
i have, a data in firebase. the structure look like this what i want is, to count all child inside a uid. so, i expect the values return 4 i have tried like this that return 2 how do i count all children in all uid?. so i can get 4 Answer You can run a forEach loop on the