MERN---Firebase-Auth-Testing

This MERN app allows users to create a account using their gmail account with the help of firebase. It has functionality for hashing the passwords with bcryptjs before saving in DB, saving cookies in local storage during login process with the help of jsonwebtoken and saving every single accounts created in MongoDB.

Stars
0
Committers
2

https://github.com/mushfiqurniazzz/MERN---Firebase-Auth-Testing/assets/148959859/4525d79d-0803-4978-934c-c69367c45699

  1. Clone the Repository: Clone this repository to your local machine:

    git clone <repository_url>

  2. Navigate to Project Directory: Move into the project directory:

    cd <project_directory>

  3. Install Dependencies: Install the necessary dependencies using npm or yarn:

    npm install

    or

    yarn

  4. Setup Environment Variables: Create a .env file in the root of your project directory and add the following variables:

    MONGODB_URI=your_mongodb_uri PORT=5000 CLIENT_PORT=3000

    Replace your_mongodb_uri with your MongoDB connection URI. Customize the PORT and CLIENT_PORT variables if needed.

  5. Start the Development Server: Run the following command to start the development server:

    npm start

  6. Firebase: Read this doc for better understanding. https://firebase.google.com/docs/reference/node

  7. Access the App: Open your web browser and navigate to http://localhost:3000 to access the app. You can now use the app locally on your machine, connected to your MongoDB database using the URI specified in the .env file.

  8. Note: The project may not work if you do not install dependencies in both front end and backend. So you would have to apply step 2 and 3 twice, once in frontend and once in backend.