Skip to content

Commit

Permalink
Changed auth persistence to work with firebase sdk 10.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LucientZ committed Aug 5, 2023
1 parent ace45aa commit 37da7e4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/config/firebaseConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { initializeApp, FirebaseApp, getApp, getApps } from 'firebase/app';
import { initializeAuth } from "firebase/auth";
import { getReactNativePersistence } from "firebase/auth/react-native";
import { getFirestore } from "firebase/firestore";
import { getStorage } from "firebase/storage";
import AsyncStorage from '@react-native-async-storage/async-storage';

const firebaseConfig = {
apiKey: "AIzaSyDPYvk1vnyyMd5I6_VJfTk9CwUmLrIFFOg",
Expand All @@ -20,9 +18,7 @@ const firebaseConfig = {
let app: FirebaseApp = getApps().length === 0 ? initializeApp(firebaseConfig) : getApp();

const db = getFirestore(app);
const auth = initializeAuth(app, {
persistence: getReactNativePersistence(AsyncStorage),
});
const auth = initializeAuth(app);
const storage = getStorage(app);

export { db, auth, storage };

0 comments on commit 37da7e4

Please sign in to comment.