Fix Signup and Login Functionality
Expected Behavior:
- Users should be required to sign up and log in to access certain features of the application.
- Upon successful login, users should be authenticated and authorized based on their roles to perform specific actions.
Proposed Solution:
- Implement user authentication using JWT (JSON Web Tokens) to securely manage user sessions.
- Implement signup, login, logout, and password reset functionality with appropriate validation and error handling.
- Set up protected routes in the backend to restrict access to authorized users only.
@SamarthKadam Please assign me this work under gssoc'24 label!
Task: Implement user authentication and authorization using JWT
Description:
Users will be required to sign up and log in to access certain features of the application. Upon successful login, users should be authenticated and authorized based on their roles to perform specific actions. Proposed Solution:
JWT Implementation: Use JWT (JSON Web Tokens) to manage user sessions securely. Generate a token upon successful login and verify it for protected routes.
Authentication Endpoints:
Implement /signup endpoint for user registration with appropriate validation checks. Implement /login endpoint for user login. Return a JWT upon successful login. Implement /logout endpoint to invalidate the JWT and log the user out. Authorization Middleware: Set up middleware to verify JWT for protected routes. Only allow access if the JWT is valid and the user has the required role.
Password Reset:
Implement /forgot-password endpoint to initiate the password reset process. Implement /reset-password endpoint to reset the password after verifying the reset token. Error Handling: Ensure proper error handling and validation checks for all endpoints to provide a seamless user experience.
Looking forward to implementing this feature and enhancing the application's security and user experience! Hey @SamarthKadam Assign me under GSSOC'24 Label
Hey, hope you're doing great! As an GSSoC contributor, I'm keen on ramping up my involvement for GSSoC'24. Could you assign this issue to me? I'm excited to continue contributing to the project. Thanks a bunch!!