Skip to content

🐞[bug]: frontend authentication not integrated with backend  #878

@harmeetsingh11

Description

@harmeetsingh11

Describe the bug

Problem Description:

While testing the sign-in/sign-up functionality on the frontend, I discovered a critical issue:

  • Backend APIs are not being called from the frontend.
  • Instead, Firebase is being used for authentication.
  • The Firebase logic is flawed and does not align with the backend API structure.

This discrepancy impacts the authentication flow and needs to be addressed by integrating the backend APIs.

Task Objectives:

We need to:

  1. Replace Firebase-based authentication in the frontend with calls to the backend APIs.
  2. Ensure seamless communication between the frontend and backend for authentication.

Required Backend API Integration:

Here are the APIs from the /backend folder to integrate with the frontend forms:

  • POST /api/auth/signin: For user login.
  • POST /api/auth/signup: For user registration.
  • GET /api/auth/user: To fetch user details after login.
  • POST /api/auth/logout: To log out the user.

Expected Frontend Behavior:

  • Display the username after a successful login.
  • Show popup alerts for the following scenarios:
    • Successful Registration
    • Successful Logout
    • Incorrect Login Credentials

Steps to Resolve:

  1. Set up the full project locally, including the MongoDB database.
  2. Replace Firebase logic in the frontend with the above backend API calls.
  3. Test the API integration locally.

Testing Requirements:

  • Since the backend is not yet deployed, attach screenshots/video of API responses in frontend when tested locally.
  • Ensure proper error handling and user-friendly messaging in the frontend.

Notes for Contributors:

  • Remove any redundant Firebase logic from the code.
  • Reach out if you encounter issues during local setup or API testing.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions