src/firebase/init.js
import { initializeApp } from 'firebase/app';
import { getFirestore, collection } from 'firebase/firestore'
import { getAuth } from 'firebase/auth'
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey:
authDomain:
databaseURL:
projectId:
storageBucket:
messagingSenderId:
appId:
measurementId:
};
const firebase = initializeApp(firebaseConfig);
//const db = getFirestore()
//export default db
export const db = getFirestore()
// generate & export auth object
export const auth = getAuth()
And now you can use it in components:
App.vue
import { auth, db } from './firebase/init.js'
Top comments (0)