New Task
Estimated time2 days
Secure Login Form with Authentication
Implementation Steps
- 1Create a form component using React
- 2Add field validation using a suitable library
- 3Connect backend for user authentication
- 4Persist sessions using SQLite
- 5Test full login and logout flow
Suggested Tests
- it('should render login form correctly')
- it('should validate input fields')
- it('should authenticate valid credentials')
- it('should prevent access with invalid credentials')
Acceptance Criteria
- 1Login form displays properly with required fields
- 2Invalid input is correctly flagged
- 3Valid users can log in and maintain a session
- 4Users are redirected upon login and logout
Implementation Details
Use React Hook Form for input validation, Prisma ORM for managing user data, and configure protected routes using React Router 7.