updated prod secret
This commit is contained in:
@@ -3,14 +3,24 @@ import { getAuth } from 'firebase/auth';
|
||||
import { getFirestore } from 'firebase/firestore';
|
||||
|
||||
const firebaseConfig = {
|
||||
apiKey: "AIzaSyAA7nmvia_CrPUnbong7xTF7vcoRdhXbyw",
|
||||
authDomain: "whsfund-c5e40.firebaseapp.com",
|
||||
projectId: "whsfund-c5e40",
|
||||
storageBucket: "whsfund-c5e40.firebasestorage.app",
|
||||
messagingSenderId: "395581871999",
|
||||
appId: "1:395581871999:web:919c94680146e45fd06c4a",
|
||||
apiKey: import.meta.env.VITE_FIREBASE_API_KEY,
|
||||
authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN,
|
||||
projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID,
|
||||
storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET,
|
||||
messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID,
|
||||
appId: import.meta.env.VITE_FIREBASE_APP_ID,
|
||||
};
|
||||
|
||||
const missingConfig = Object.entries(firebaseConfig)
|
||||
.filter(([, value]) => !value)
|
||||
.map(([key]) => key);
|
||||
|
||||
if (missingConfig.length > 0) {
|
||||
throw new Error(
|
||||
`Missing Firebase config for ${import.meta.env.MODE}: ${missingConfig.join(', ')}`
|
||||
);
|
||||
}
|
||||
|
||||
const app = initializeApp(firebaseConfig);
|
||||
export const auth = getAuth(app);
|
||||
export const db = getFirestore(app);
|
||||
|
||||
Reference in New Issue
Block a user