-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from deonneon/master
upgrade from Expo 46 to 49
- Loading branch information
Showing
4 changed files
with
6,437 additions
and
3,561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
import { initializeApp } from 'firebase/app'; | ||
import { initializeAuth, getReactNativePersistence } from 'firebase/auth'; | ||
import Constants from 'expo-constants'; | ||
import AsyncStorage from '@react-native-async-storage/async-storage'; | ||
import { initializeApp } from "firebase/app"; | ||
// import { initializeAuth, getReactNativePersistence } from "firebase/auth"; | ||
import { initializeAuth } from "firebase/auth"; | ||
import Constants from "expo-constants"; | ||
// import AsyncStorage from "@react-native-async-storage/async-storage"; | ||
|
||
// add firebase config | ||
const firebaseConfig = { | ||
apiKey: Constants.manifest.extra.apiKey, | ||
authDomain: Constants.manifest.extra.authDomain, | ||
projectId: Constants.manifest.extra.projectId, | ||
storageBucket: Constants.manifest.extra.storageBucket, | ||
messagingSenderId: Constants.manifest.extra.messagingSenderId, | ||
appId: Constants.manifest.extra.appId, | ||
apiKey: Constants.expoConfig?.extra?.apiKey, | ||
authDomain: Constants.expoConfig?.extra?.authDomain, | ||
projectId: Constants.expoConfig?.extra?.projectId, | ||
storageBucket: Constants.expoConfig?.extra?.storageBucket, | ||
messagingSenderId: Constants.expoConfig?.extra?.messagingSenderId, | ||
appId: Constants.expoConfig?.extra?.appId, | ||
}; | ||
|
||
// initialize firebase | ||
const app = initializeApp(firebaseConfig); | ||
|
||
// initialize auth | ||
const auth = initializeAuth(app, { | ||
persistence: getReactNativePersistence(AsyncStorage), | ||
}); | ||
// | ||
// Need to upgrade to Expo with typescrip inorder getReactNativePersistence to work. | ||
// | ||
|
||
//initialize auth | ||
// const auth = initializeAuth(app, { | ||
// persistence: getReactNativePersistence(AsyncStorage), | ||
// }); | ||
|
||
const auth = initializeAuth(app); | ||
|
||
export { auth }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Learn more https://docs.expo.dev/guides/customizing-metro/ | ||
const { getDefaultConfig } = require("expo/metro-config"); | ||
|
||
/** @type {import('expo/metro-config').MetroConfig} */ | ||
const defaultConfig = getDefaultConfig(__dirname); | ||
defaultConfig.resolver.sourceExts.push("cjs"); | ||
|
||
defaultConfig.resolver.mainFields = ["react-native", "browser", "main"]; | ||
|
||
module.exports = defaultConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.