Update firebase.js
This commit is contained in:
parent
4ef53e9378
commit
6873abcc4c
1 changed files with 6 additions and 2 deletions
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
|
||||
import { initializeApp } from 'firebase/app';
|
||||
import { getAuth } from 'firebase/auth';
|
||||
import { initializeAuth, getReactNativePersistence } from 'firebase/auth';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
|
||||
const firebaseConfig = {
|
||||
apiKey: process.env.EXPO_PUBLIC_FIREBASE_API_KEY,
|
||||
|
|
@ -14,6 +16,8 @@ const firebaseConfig = {
|
|||
|
||||
|
||||
const app = initializeApp(firebaseConfig);
|
||||
const auth = getAuth(app);
|
||||
const auth = initializeAuth(app, {
|
||||
persistence: getReactNativePersistence(AsyncStorage)
|
||||
});
|
||||
|
||||
export { auth };
|
||||
|
|
|
|||
Loading…
Reference in a new issue