Description
We need to implement a complete authentication system for TaskFlow Pro.
Requirements
Backend (FastAPI):
- User registration (
POST /api/v1/auth/register)
- User login (
POST /api/v1/auth/login)
- JWT Access + Refresh tokens
- Protected routes using dependency injection
- Password hashing with
passlib[bcrypt]
Frontend (React):
- Login page
- Register page
- Protected routes (using React Router)
- Store auth token (httpOnly cookie or localStorage + context)
- Logout functionality
Acceptance Criteria
- Users can register with email + password
- Users can login and receive JWT tokens
- Protected endpoints return 401 if not authenticated
- Frontend redirects unauthenticated users to login
- Basic error handling and success messages
Related Files
backend/app/core/security.py
backend/app/api/v1/endpoints/auth.py
backend/app/models/user.py
backend/app/schemas/user.py
frontend/src/pages/Login.tsx
frontend/src/pages/Register.tsx
Priority
High - This is foundational for the whole application.
Description
We need to implement a complete authentication system for TaskFlow Pro.
Requirements
Backend (FastAPI):
POST /api/v1/auth/register)POST /api/v1/auth/login)passlib[bcrypt]Frontend (React):
Acceptance Criteria
Related Files
backend/app/core/security.pybackend/app/api/v1/endpoints/auth.pybackend/app/models/user.pybackend/app/schemas/user.pyfrontend/src/pages/Login.tsxfrontend/src/pages/Register.tsxPriority
High - This is foundational for the whole application.