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