Compare commits

...

No commits in common. "803a8dac0081d0648c89a1ea5b366dd812e61bf8" and "a10dbbf26c9e5c57aaf5db2075b0fb95e4d3a87d" have entirely different histories.

View file

@ -1,15 +1,27 @@
import {
PUBLIC_FIREBASE_API_KEY,
PUBLIC_FIREBASE_APP_ID,
PUBLIC_FIREBASE_AUTH_DOMAIN,
PUBLIC_FIREBASE_MESSAGING_SENDER_ID,
PUBLIC_FIREBASE_PROJECT_ID,
PUBLIC_FIREBASE_STORAGE_BUCKET
} from '$env/static/public';
import { getApp, getApps, initializeApp } from 'firebase/app'; import { getApp, getApps, initializeApp } from 'firebase/app';
import { browserSessionPersistence, getAuth, GoogleAuthProvider, setPersistence } from 'firebase/auth'; import {
browserSessionPersistence,
getAuth,
GoogleAuthProvider,
setPersistence
} from 'firebase/auth';
import { getFirestore } from 'firebase/firestore'; import { getFirestore } from 'firebase/firestore';
const firebaseConfig = { const firebaseConfig = {
apiKey: "AIzaSyC-xcjafyqmPl-NMe3heXN4FIPXQLRyXIg", apiKey: PUBLIC_FIREBASE_API_KEY,
authDomain: "tbm-m2.firebaseapp.com", authDomain: PUBLIC_FIREBASE_AUTH_DOMAIN,
projectId: "tbm-m2", projectId: PUBLIC_FIREBASE_PROJECT_ID,
storageBucket: "tbm-m2.firebasestorage.app", storageBucket: PUBLIC_FIREBASE_STORAGE_BUCKET,
messagingSenderId: "20532687058", messagingSenderId: PUBLIC_FIREBASE_MESSAGING_SENDER_ID,
appId: "1:20532687058:web:637999283406be917abd0b" appId: PUBLIC_FIREBASE_APP_ID
}; };
export const app = getApps().length === 0 ? initializeApp(firebaseConfig) : getApp(); export const app = getApps().length === 0 ? initializeApp(firebaseConfig) : getApp();
@ -18,3 +30,4 @@ export const auth = getAuth(app);
export const db = getFirestore(app); export const db = getFirestore(app);
await setPersistence(auth, browserSessionPersistence); await setPersistence(auth, browserSessionPersistence);
await setPersistence(auth, browserSessionPersistence);