firebase react js
npm install firebase
react native firebase
// Using npm
npm install --save @react-native-firebase/app
# create your firebase android project and follow the steps for implementations.
# check: https://rnfirebase.io/#generating-android-credentials
firebase for React Native
import { firebase } from "@firebase/app";
//import modules
import "@firebase/auth";
const firebaseConfig = {
apiKey: "",
authDomain: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: "",
};
//Delete that after realisation of authContext !!
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}
//Auth with email and password
//Put into export App
const [isAuthenticated, setIsAuthenticated] = useState(false);
useEffect(() => {
firebase
.auth()
.signInWithEmailAndPassword("[email protected]", "password")
.then((user) => {
console.log(user);
setIsAuthenticated(true);
})
.catch((e) => {
console.log(e);
});
}, []);
add firebase to react native
yarn add firebase
react native firebase
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services' // <- Add this line
react native firebase
/* Answer to: "react native firebase" */
/*
React Native Firebase is the officially recommended collection
of packages that brings React Native support for all Firebase
services on both Android and iOS apps.
*/
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us