mirasoldavila13 / NeighborhoodAid

NeighborhoodAid is an interactive platform designed to empower communities by enabling users to report local issues like potholes, vandalism, and streetlight outages.
MIT License
0 stars 0 forks source link

Authentication and Authorization Using JWT #6

Open mirasoldavila13 opened 3 weeks ago

mirasoldavila13 commented 3 weeks ago

User Story:

AS A user, I WANT TO log in securely using my email and password, SO THAT I can access my account and report issues.

Acceptance Criteria:

  1. Users should log in using their email and password.
  2. Upon successful login, a JWT token should be generated and returned to the user.
  3. The JWT token should be used to access protected routes (e.g., reporting an issue, viewing user-specific data).
  4. JWT tokens should be securely stored on the frontend (localStorage) and included in requests to protected routes.

Tasks:

PandaKao commented 3 weeks ago

Created authentication branch, moved issueRoutes into a new folder within routes called api so now routing for issues is /api/issue. Auth route for login is /auth/login.