priyankarpal / projectshut

Projectshut is an open source web app that enables users to freely publish their projects and create user profiles within the platform ✨🚀
https://www.projectshut.tech
MIT License
396 stars 493 forks source link

[Feat]: Implement Login and Signup Feature for User Authentication in MERN Stack #804

Closed exploring-solver closed 1 year ago

exploring-solver commented 1 year ago

What feature?

Backend Setup: Develop the necessary backend APIs and routes using Express.js and Node.js to handle user authentication. This includes creating endpoints for user registration, login, and logout. Implement proper validation and encryption techniques to ensure secure storage and transmission of user credentials.

Database Integration: Utilize MongoDB as the database to store user information such as usernames, passwords (hashed), and any additional user data required. Implement the necessary models and schemas to interact with the database and perform user-related operations.

User Registration: Create a user registration form on the frontend using React, allowing users to provide their desired username, email address, and password. Implement form validation to ensure the data is entered correctly. On submission, send the user data to the backend API for registration.

User Login: Design a login form where users can enter their credentials (username/email and password) to authenticate themselves. Implement client-side validation for login credentials and send the data to the backend for verification. On successful login, generate and store a session token or JWT (JSON Web Token) to maintain user authentication.

User Authentication and Authorization: Implement middleware on the backend to authenticate user requests for protected routes. Ensure that only authenticated users can access specific features and perform certain actions. Manage user sessions or JWTs to maintain persistent authentication across requests.

Frontend Integration: Integrate the login and signup forms into the ProjectHut frontend using React components and TailwindCSS for styling. Implement error handling and display appropriate feedback messages for successful registrations, login failures, and validation errors.

User Profile and Account Management: Extend the functionality to allow users to view and manage their profiles, update account information, and reset passwords if necessary.

Add screenshots

image Just a draft Design

Code of Conduct

github-actions[bot] commented 1 year ago

To reduce notifications, issues are locked. Your issue will be unlock when we will add label as 🏁 status: ready for dev or 👍 status: approved. Check out the contributing guide for more information. Also, if you're in GSSoC'23 please check the discussion

priyankarpal commented 1 year ago

why should we need a registration form? we are using a simple front-end web app also, we are thinking of adding github Auth & backend later.

exploring-solver commented 1 year ago

a registration and login feature would help in fetching user specific data and they can simply add their repository in the database from the website and this will automate the process of adding projects in ProjectHut also yes we can also use github auth but we should try to make it such that user can see his/her dashboard and it would help in later adding the feature of comments and discussion on a project in the website

priyankarpal commented 1 year ago

a registration and login feature would help in fetching user specific data and they can simply add their repository in the database from the website and this will automate the process of adding projects in ProjectHut also yes we can also use github auth but we should try to make it such that user can see his/her dashboard and it would help in later adding the feature of comments and discussion on a project in the website

yes, but we will add it later. currently, we're working on new features so ig we don't need to log in for now.