Setup
Setup React binding for firebase auth.
Install
If you haven't, install the firebase JS client.
yarn add firebase
# Or
npm i firebase
Install @react-firebase/auth
yarn add @react-firebase/auth # or npm i @react-firebase/auth
Change PROJECT_NAME
to your project name and grab your firebase config here :
https://console.firebase.google.com/project/PROJECT_NAME/settings/general/
Your config file should look something like this :
// Firebase Config
const config = {
apiKey: "API_KEY",
projectId: "PROJECT_ID",
databaseURL: "DATABASE_URL",
authDomain: "AUTH_DOMAIN",
// OPTIONAL
storageBucket: "STORAGE_BUCKET",
messagingSenderId: "MESSAGING_SENDER_ID"
};
Last updated