Created
February 19, 2022 01:00
-
-
Save ben-hamel/10fea72e1a07974d51a7a8ad51ed326e to your computer and use it in GitHub Desktop.
Firebase V9 config file + getAuth: for use with Expo managed React Native app using Firebase JS SDK
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
import { initializeApp } from "firebase/app"; | |
import { getAuth } from "firebase/auth"; | |
import Constants from "expo-constants"; | |
// Initialize Firebase | |
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, | |
}; | |
// initialize firebase | |
initializeApp(firebaseConfig); | |
// initialize auth | |
const auth = getAuth(); | |
export { auth }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment