Spaces:
Sleeping
Sleeping
| /** | |
| * Firebase configuration and initialization | |
| */ | |
| import { initializeApp } from 'firebase/app'; | |
| import { getAuth, GoogleAuthProvider } from 'firebase/auth'; | |
| // Firebase configuration from environment variables | |
| const firebaseConfig = { | |
| 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, | |
| }; | |
| // Initialize Firebase | |
| const app = initializeApp(firebaseConfig); | |
| // Initialize Firebase Authentication and get a reference to the service | |
| export const auth = getAuth(app); | |
| // Configure Google Auth Provider | |
| export const googleProvider = new GoogleAuthProvider(); | |
| googleProvider.setCustomParameters({ | |
| prompt: 'select_account' | |
| }); | |
| export default app; | |