Mano? a configuração do firebase é literalmente isso aqui
import { initializeApp } from "firebase/app";
import { getFirestore, collection, getDocs } from "firebase/firestore/lite";
const init = initializeApp({
apiKey: process.env.FIREBASE_API_KEY,
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
projectId: process.env.FIREBASE_PROJECT_ID,
storageBucket: process.env.FIREBASE_STORAGE_BUCKET,
messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,
appId: process.env.FIREBASE_APP_ID,
measurementId: process.env.FIREBASE_MEASUREMENT_ID
});
let db = getFirestore(init);
const userCollection = collection(db, 'users');
const usersSnap = await getDocs(userCollection);
const usersList = usersSnap.docs.map((user) => {
return {
id: user.id,
data: user.data()
}
});