A react app using hooks integrated with firebase for authenticating users. The app includes following features:
-
Full Firebase Platform Support Including Firestore Database, Authentication, Analytics and Storage
-
Uses react-hooks only for components ✅ Functional components 🚫 Class components
-
Utilize useReducer and useContext react hooks to manage global state of the app and useState for internal component states.
-
Various authentication methods to authenticate users:
* SignUp using email and password * Sign In using Facebook and Google * Sign In using an email link
-
MaterialUI design components
Step 1:
Download or clone this repo by using the link below:
git clone https://github.com/walf-dev/react-firebase-auth
Step 2:
Setup a new project in firebase and get the configuration. It will look something like this:
Step 3:
Go to the root folder of the project.
cd react-firebase-auth
Create a new file .env
touch .env
Add these env variables with the config values you recieived from firebase
(No quotes ""
required)
REACT_APP_FIREBASE_API_KEY=
REACT_APP_FIREBASE_AUTH_DOMAIN=
REACT_APP_FIREBASE_DATABASE_URL=
REACT_APP_FIREBASE_PROJECT_ID=
REACT_APP_FIREBASE_STORAGE_BUCKET=
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=
REACT_APP_FIREBASE_APP_ID=
REACT_APP_FIREBASE_MEASUREMENT_ID=
Step 5:
Execute the following command in console to install the required packages:
npm install
Step 4: Simply run the app using
./run.sh