Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Backend Support for Two-Factor Authentication (2FA) #2614

Open
camillegonzales opened this issue Nov 23, 2024 · 2 comments
Open

Add Backend Support for Two-Factor Authentication (2FA) #2614

camillegonzales opened this issue Nov 23, 2024 · 2 comments

Comments

@camillegonzales
Copy link

Is your feature request related to a problem? Please describe.
The CARE project currently lacks backend support for Two-Factor Authentication (2FA). Frontend work (Issue #6715) is in progress, but backend enhancements are essential for generating, verifying, and securely storing Time-Based One-Time Password (TOTP) tokens. Without backend support, 2FA cannot function, leaving accounts vulnerable to unauthorized access.

Describe the solution you'd like
Add backend functionality to complement frontend implementation:

  • Database Updates: Add fields for encrypted TOTP secrets and 2FA status.
  • API Endpoints:
    • Generate and verify TOTP tokens
    • Enable/disable 2FA
    • Provide backup codes for recovery
  • Security Measures:
    • Encrypt TOTP secrets
    • Implement rate limiting for token verification
  • Testing: Create unit and integration tests for all 2FA features

Describe alternatives you've considered

  • Relying only on frontend logic for 2FA is insecure
  • Using external 2FA services increases dependency on third-party tools and raises privacy concerns

Additional context
The frontend issue mentions integrating a library compatible with TOTP, such as pyotp.

@shobhit8797
Copy link

@camillegonzales or maintainers, I would like to work on this issue. Please assign me this issue

@yash-learner
Copy link
Member

@camillegonzales Thanks for creating the backend issue.

@shobhit8797 I had started working on MFA and created a Proposal and waiting for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants