-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Goal:
Set up secure authentication for admins and volunteers.
Tasks:
- Implement JWT or session-based auth for login and logout
- Create
POST /api/auth/loginandPOST /api/auth/logoutendpoints - Store hashed passwords and issue access tokens
- Add middleware to validate tokens and enforce role-based access (
ADMIN,VOLUNTEER) - Optional: refresh-token mechanism for longer sessions
Acceptance Criteria:
- Users can log in and receive a valid token
- Protected routes reject unauthorized access
- Admins can reach admin endpoints; volunteers cannot