Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
harmeetsingh11 opened this issue Jan 15, 2025 · 1 comment
Open
Labels
ADVANCED 40 POINTS bug Something isn't working SWOC

Comments

@harmeetsingh11
Copy link
Collaborator

harmeetsingh11 commented Jan 15, 2025

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.
@github-actions github-actions bot added SWOC bug Something isn't working labels Jan 15, 2025
Copy link

Hi there! Thanks for opening this issue @harmeetsingh11!. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible.If belong's to SWOC program role ur self as Contributor in OS lead site Link : https://www.oslead.xyz/usertype , so that ur points will be assigned to the leaderboard. New to Open Source Contribution check out the below YT video , Happy Coding🚀💻🐛 🔗 Link : https://www.youtube.com/watch?v=3afUKB3guZA

@harmeetsingh11 harmeetsingh11 changed the title 🐞[bug]: Frontend Authentication Not Integrated with Backend 🐞[bug]: frontend authentication not integrated with backend Jan 15, 2025
@harmeetsingh11 harmeetsingh11 added the ADVANCED 40 POINTS label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADVANCED 40 POINTS bug Something isn't working SWOC
Projects
None yet
Development

No branches or pull requests

1 participant