Problem Description
The application only supports password authentication, no two-factor authentication (2FA) is available.
Context
2FA significantly improves account security by requiring a second factor (TOTP) in addition to password.
Steps to Reproduce
- Log in with just email and password
- No second factor is required
Expected Behavior
Users should be able to enable 2FA for enhanced security.
Actual Behavior
Only password authentication is available.
Files to Investigate
- `app/models/user.rb` - Add 2FA fields
- `app/controllers/sessions_controller.rb` - Add 2FA verification step
- Add TOTP gem (rotp or devise-two-factor)
Acceptance Criteria
Suggested Approach
Use rotp gem for TOTP generation:
- User enables 2FA, generate secret
- Show QR code for authenticator app
- Verify setup with code
- Require 2FA code on subsequent logins
Difficulty: Hard
Estimated time: 3-6 hours
Prerequisites: TOTP, security concepts
Learning outcomes: Two-factor authentication, TOTP implementation
Problem Description
The application only supports password authentication, no two-factor authentication (2FA) is available.
Context
2FA significantly improves account security by requiring a second factor (TOTP) in addition to password.
Steps to Reproduce
Expected Behavior
Users should be able to enable 2FA for enhanced security.
Actual Behavior
Only password authentication is available.
Files to Investigate
Acceptance Criteria
Suggested Approach
Use rotp gem for TOTP generation:
Difficulty: Hard
Estimated time: 3-6 hours
Prerequisites: TOTP, security concepts
Learning outcomes: Two-factor authentication, TOTP implementation