- Forums
- Tutorial and Guides
- Firebase API Authentication For React App Tutorial
This toturial covers that steps to create and add a firebase with database to your react app [5018], Last Updated: Mon Jun 24, 2024
junk
Wed Oct 05, 2022
0 Comments
463 Visits
This tutorial covers that steps to create and add a Firebase with database to your react app.
Firebase Authentication Steps:
- https://console.firebase.google.com/
- click add project
05-p5018-firebase-tutorial-add-project.jpg
- Name project
- Select the default settings
- Under Build, select Authentication
05-p5018-firebase-tutorial-authentication1.jpg
- Select Sign-in Method Tab and click on Email/Password
05-p5018-firebase-tutorial-authentication-metho-email.jpg
- Enable Email/Password and save
05-p5018-ase-tutorial-authentication-metho-email-enable.jpg
- Now go to Project Overview > Project Settings > General Tab
05-p5018-firebase-tutorial-settings.jpg
- scroll to the bottom to the apps section and select the code icon
05-p5018-firebase-tutorial-settings-apps.jpg
- Register your app with a nickname
05-p5018-firebase-tutorial-settings-apps-register.jpg
- Note the SDK information, this information will be used for your app.
05-p5018-firebase-tutorial-settings-apps-sdk.jpg
- This also provides the API Key information and instructions on how to add the firebase dependencies with npm
npm install firebase
Open Source Code: I found this very cool NetFlix Clone app you can clone and try your new Firebase Authentication skills. For this app, make sure you create a .env.local file.
Clone:
git clone --depth=1 https://github.com/fedi1919/Netflix-clone.git
.env.local file
REACT_APP_FIREBASE_API_KEY = example_lkajdlfjasldkfjaklsjdfkljasdf
REACT_APP_FIREBASE_AUTH_DOMAIN = examplethis-that.firebaseapppicaiont.com
REACT_APP_FIREBASE_PROJECT_ID = example-0this
REACT_APP_FIREBASE_STORAGE_BUCKET = example-this.appspotios.com
REACT_APP_FIREBASE_MESSAGING_SENDER = 451245124584546
REACT_APP_FIREBASE_APP_ID = 1:45215452121545:web:546a5sdf650as4df654as65d
REACT_APP_MOVIEDB_API_KEY = 546a4sd5f4as6df46a5s4df0a56s4df56
Notice the moviedb app key, yeah, you can sign up for a free API key at: https://www.themoviedb.org/settings/api
I found a good youtube tutorial that helped me a lot.
9bXhf_TELP4
Hope that helps