Skip to content

Instantly share code, notes, and snippets.

@hieptl
Created October 10, 2021 16:04
Show Gist options
  • Save hieptl/814e9b6a14a6e5609f98857ae0b02fed to your computer and use it in GitHub Desktop.
Save hieptl/814e9b6a14a6e5609f98857ae0b02fed to your computer and use it in GitHub Desktop.
firebase.js - React Native Gifted Chat App
import { fbConfig } from "./env";
import { initializeApp } from 'firebase/app';
import { getAuth, createUserWithEmailAndPassword, signInWithEmailAndPassword } from "firebase/auth";
const firebaseConfig = {
apiKey: `${fbConfig.apiKey}`,
authDomain: `${fbConfig.authDomain}`,
projectId: `${fbConfig.projectId}`,
storageBucket: `${fbConfig.storageBucket}`,
messagingSenderId: `${fbConfig.messagingSenderId}`,
appId: `${fbConfig.appId}`,
};
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
export { auth, createUserWithEmailAndPassword, signInWithEmailAndPassword };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment