Skip to content

Conversation

@Harshika1214
Copy link

This PR implements the “User Authentication Logic” required for the backend.
The following functionality has been added:

User Registration

  • Accepts username, email, and password
  • Validates fields
  • Hashes passwords using PBKDF2
  • Stores user in database

User Login

  • Validates email & password
  • Verifies hashed password
  • Returns success response

JWT Authentication

  • Generates secure JWT token using project SECRET_KEY
  • Includes user_id and expiry
  • Used for future protected routes

Blueprint Integration

  • Auth routes served under /api/auth
  • Works with existing modular routing structure

Testing

  • Successfully tested using Thunder Client
  • /register returns User registered!
  • /login returns valid JWT token

This completes the backend user authentication logic.

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