Node JS – Initialize Firebase using service account key or Firebase config file?

Advertisements I’m trying to learn how to use Firebase with Node JS and there’s a thing I can’t understand. I’ve been looking for an explanation for a few days now, but I just can’t find something useful. After following some tutorials, I’m confused because some of them use the serviceAccountKey file which looks like "type":… Read More Node JS – Initialize Firebase using service account key or Firebase config file?

'Firebase' is not defined

Advertisements I am using Reactjs and firebase to create a Login Page in my application. I got an error that the ‘firebase’ is not defined in the part of onClick. Here is my Log In Page code: import React from ‘react’; import { FacebookFilled, GoogleSquareFilled} from ‘@ant-design/icons’; import "firebase/app"; import { auth } from ‘../components/firebase’;… Read More 'Firebase' is not defined

React custom hook to fetch document from firebase isLoading always false

Advertisements I created this custom hook to fetch (in this case listen to) a document in firestore: import { doc, onSnapshot } from ‘firebase/firestore’; import { useEffect, useState } from ‘react’; import { db, auth } from ‘../../firebase’; function useCurrentUser() { const userId = auth.currentUser.uid; const [user, setUser] = useState({}); const [isUserLoading, setIsUserLoading] = useState(false);… Read More React custom hook to fetch document from firebase isLoading always false

How to filter firebase data using a where clause with FieldPat.documentId

Advertisements Im trying to retrieve data with Stream<List<User>> getUsers(User user) { List<String> userFilter = List.from(user.swipeLeft!) ..addAll(user.swipeRight!) ..add(user.uid!); return _firebaseFirestore .collection(‘users’) .where(‘interestedIn’, isEqualTo: ‘HIRING’) .where(FieldPath.documentId, whereNotIn: userFilter) .snapshots() .map((snap) { return snap.docs.map((doc) => User.fromSnapshot(doc)).toList(); }); } I get an error An error occurred while parsing query arguments, this is most likely an error with this SDK.… Read More How to filter firebase data using a where clause with FieldPat.documentId