Firebase Authentication Guide

Firebase SetUp

step-1: run command in the terminal to install latest firebase package. below code is for your reference

npm install firebase --save 
									

step-2: Add firebase API configuration details(create database on firebase) to the firebase Auth Component refer the path (/src/firebase/firebaseapi.tsx)

		
const firebaseConfig = {
apiKey: "your apiKey",
authDomain: "your authDomain",
projectId: "your projectId",
storageBucket: "your storageBucket",
messagingSenderId: "your messagingSenderId",
appId: "your appId",
measurementId: "your measurementId",
};
const firebaseApp = firebase.initializeApp(firebaseConfig);

const db = firebaseApp.firestore();
const auth = firebase.auth();

export { db, auth };
Firebase SetUp Remove

step-1: Remove your whole firebase folder from the template the path as follow root:src/firebase

step-2: Remove from the Routing file src/main.jsx

		

            //firebase authentication

         <Route path={`${import.meta.env.BASE_URL}`} element={}>

           <Route index element={} />

           <Route path={`${import.meta.env.BASE_URL}firebase/firebasesignin`} element={} />
           <Route path={`${import.meta.env.BASE_URL}firebase/firebasesignup`} element={} />
           <Route path={`${import.meta.env.BASE_URL}firebase/firebasereset`} element={} />

           <Route path='*' element={} />

           <Route path={`authentication/login`} element={} />
           <Route path={`${import.meta.env.BASE_URL}authentication/register`} element={} />
           <Route path={`${import.meta.env.BASE_URL}authentication/forgotpassword`} element={} />
           <Route path={`${import.meta.env.BASE_URL}authentication/lockscreen`} element={} />
           <Route path={`${import.meta.env.BASE_URL}authentication/underconstruction`} element={} />
           <Route path={`${import.meta.env.BASE_URL}authentication/errorpages/error400`} element={} />
           <Route path={`${import.meta.env.BASE_URL}authentication/errorpages/error401`} element={} />
           <Route path={`${import.meta.env.BASE_URL}authentication/errorpages/error403`} element={} />
           <Route path={`${import.meta.env.BASE_URL}authentication/errorpages/error404`} element={} />
           <Route path={`${import.meta.env.BASE_URL}authentication/errorpages/error500`} element={} />
           <Route path={`${import.meta.env.BASE_URL}authentication/errorpages/error503`} element={} />

        </Route>
            
            

Note: change the index element to dashboard index page

step-3: Remove the path from the Header section src/components/layout-components/header/header.tsx

	
              
                <Dropdown.Menu as='ul' className="main-header-dropdown pt-0 overflow-hidden header-profile-dropdown" align='end'>
                <Link to={`${import.meta.env.BASE_URL}firebase/firebasesignin/`}  className='dropdown-item d-flex' >
                <i className="ti ti-logout fs-18 me-2 op-7"></i>Log Out</Link>
                </Dropdown.Menu>
          
            
            

step-4: Remove the firbase package from package.json/package.json and re-install the node Modules