Skip to content
Advertisement

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_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

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

Advertisement