Switch to Firebase

JWT to Firebase

Set Firebase Config

At present, firebase uses you need to set a secret in the following file. For more detail refer to firebase here: https://firebase.google.com/docs/reference/rest/auth

.env
...
###
## Firebase - Google Auth 

REACT_APP_FIREBASE_API_KEY=
REACT_APP_FIREBASE_AUTH_DOMAIN=
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=
###
...

Change AuthProvider

..\src\App.js
import { FirebaseProvider as AuthProvider } from 'contexts/FirebaseContext';

Change auth Hooks

Comment another context in the following file and uncomment Firebase one.

..\src\hooks\useAuth.js
import AuthContext from 'contexts/FirebaseContext';

Change login page view

Comment another Login page in the following file and uncomment Firebase one.

..\src\views\auht\signin\SignIn1.js
import AuthLogin from './FirebaseLogin'

Last updated