Two factor Authentification#446
Merged
mftee merged 1 commit intoApr 26, 2026
Merged
Conversation
Contributor
|
Someone is attempting to deploy a commit to the Mftee's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@RUKAYAT-CODER Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
mftee
approved these changes
Apr 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #342
close #339
close #352
close #351
User Notification Preferences Management
Created: backend/cmmty/notification-prefs/ with entity, module, controller, and service
Entity: NotificationPrefs with userId (PK), riskAlert, verificationComplete, weeklyDigest fields
Endpoints: GET and PATCH /cmmty/users/me/notification-preferences
Integration: Updated MailService to check preferences before sending emails
Tests: Comprehensive unit tests for preference retrieval and update functionality
Platform Analytics Tracking Service
Created: backend/cmmty/analytics/ with module, controller, and service
Endpoint: GET /cmmty/admin/analytics with period parameter (7d, 30d, 90d)
Features: Time-series data for uploads, verifications, and new users; aggregate risk metrics
Security: Admin-only access with role validation
Tests: Unit tests for data aggregation logic and date range handling
Bulk Document Upload Support
Created: backend/cmmty/bulk-upload/ with module, controller, and service
Endpoint: POST /cmmty/documents/bulk accepting up to 10 files
Features: Individual file processing, partial failure handling, file validation
Validation: 20MB size limit and MIME type validation for each file
Tests: Unit tests for batch validation and partial failure scenarios
TOTP Two-Factor Authentication
Created: backend/cmmty/two-factor-auth/ with module, controller, and service
Package: Installed and integrated speakeasy for TOTP generation/verification
Endpoints:
POST /cmmty/auth/2fa/generate - returns QR code URI and backup codes
POST /cmmty/auth/2fa/enable - verifies TOTP code and enables 2FA
POST /cmmty/auth/2fa/verify - called during login when 2FA is active
Entity Updates: Added two-factor fields to User entity
Tests: Comprehensive unit tests for TOTP generation and verification
All implementations follow the existing project patterns, include proper error handling, validation, and comprehensive unit tests. Each module has been properly integrated into the main application module and follows NestJS best practices.