Skip to content

馃殌 Feature: Implement User Authentication (JWT + Login/Register)#2

Description

@bundlab

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.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions