Skip to content

Fix issue #61: Create User Login & Registration Backend with JWT#78

Open
divyaa-choudhary wants to merge 4 commits intoAyush0316:mainfrom
divyaa-choudhary:issue-61-fix
Open

Fix issue #61: Create User Login & Registration Backend with JWT#78
divyaa-choudhary wants to merge 4 commits intoAyush0316:mainfrom
divyaa-choudhary:issue-61-fix

Conversation

@divyaa-choudhary
Copy link

@divyaa-choudhary divyaa-choudhary commented Aug 11, 2025

This PR introduces the AuthController, which handles user authentication and authorisation features in the application. It primarily has three end-points:

1. User Registration
Allows new users to register by providing the necessary (fullName, email, password, role) details. Passwords are securely hashed before being stored in the database.

2. User Login
Accepts user credentials (email, password), validates email and password, and issues a JWT token on successful authentication. This token enables stateless, secure access to protected endpoints.

3. User Logout
Supports user logout by blacklisting JWT tokens in Redis to prevent further use until expiration.

To-do: TestCases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant