Compare commits
No commits in common. "a10dbbf26c9e5c57aaf5db2075b0fb95e4d3a87d" and "803a8dac0081d0648c89a1ea5b366dd812e61bf8" have entirely different histories.
a10dbbf26c
...
803a8dac00
1 changed files with 9 additions and 22 deletions
|
|
@ -1,27 +1,15 @@
|
||||||
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 {
|
import { browserSessionPersistence, getAuth, GoogleAuthProvider, setPersistence } from 'firebase/auth';
|
||||||
browserSessionPersistence,
|
|
||||||
getAuth,
|
|
||||||
GoogleAuthProvider,
|
|
||||||
setPersistence
|
|
||||||
} from 'firebase/auth';
|
|
||||||
import { getFirestore } from 'firebase/firestore';
|
import { getFirestore } from 'firebase/firestore';
|
||||||
|
|
||||||
const firebaseConfig = {
|
const firebaseConfig = {
|
||||||
apiKey: PUBLIC_FIREBASE_API_KEY,
|
apiKey: "AIzaSyC-xcjafyqmPl-NMe3heXN4FIPXQLRyXIg",
|
||||||
authDomain: PUBLIC_FIREBASE_AUTH_DOMAIN,
|
authDomain: "tbm-m2.firebaseapp.com",
|
||||||
projectId: PUBLIC_FIREBASE_PROJECT_ID,
|
projectId: "tbm-m2",
|
||||||
storageBucket: PUBLIC_FIREBASE_STORAGE_BUCKET,
|
storageBucket: "tbm-m2.firebasestorage.app",
|
||||||
messagingSenderId: PUBLIC_FIREBASE_MESSAGING_SENDER_ID,
|
messagingSenderId: "20532687058",
|
||||||
appId: PUBLIC_FIREBASE_APP_ID
|
appId: "1:20532687058:web:637999283406be917abd0b"
|
||||||
};
|
};
|
||||||
|
|
||||||
export const app = getApps().length === 0 ? initializeApp(firebaseConfig) : getApp();
|
export const app = getApps().length === 0 ? initializeApp(firebaseConfig) : getApp();
|
||||||
|
|
@ -30,4 +18,3 @@ 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);
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue