Skip to content

Commit c790c9e

Browse files
committed
Implement user account lockout and multi-method 2FA
- Added TwoFactorAuthService supporting TOTP (Google Authenticator) and email-based 2FA with backup codes - Implemented 2FA setup, verification, disabling, and regeneration commands with corresponding handlers - Created new API router and request/response schemas for 2FA endpoints - Updated LoginUserCommandHandler to integrate 2FA verification and temporary token generation - Enhanced account lockout mechanism to prevent brute force login attempts - Added dependency injection for new 2FA handlers and integrated with existing auth flow
1 parent 807e5c7 commit c790c9e

8 files changed

Lines changed: 995 additions & 57 deletions

File tree

.gitignore

Lines changed: 15 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,23 @@
11
```
2-
# Python
2+
*.pyc
33
__pycache__/
4-
*.py[cod]
5-
*$py.class
6-
*.so
7-
.Python
8-
build/
9-
develop-eggs/
10-
dist/
11-
downloads/
12-
eggs/
13-
.eggs/
14-
lib/
15-
lib64/
16-
parts/
17-
sdist/
18-
var/
19-
wheels/
20-
*.egg-info/
21-
.installed.cfg
22-
*.egg
23-
MANIFEST
24-
25-
# Virtual environments
26-
venv/
27-
ENV/
28-
env/
29-
.venv/
30-
.env/
31-
32-
# IDE
33-
.vscode/
34-
.idea/
35-
*.swp
36-
*.swo
37-
38-
# Logs
394
*.log
40-
41-
# Environment variables
5+
*.tmp
6+
*.swp
427
.env
438
.env.local
44-
*.env.*
45-
46-
# Coverage reports
9+
.env.*
10+
.vscode/
11+
.idea/
12+
dist/
13+
build/
14+
target/
15+
.venv/
16+
venv/
17+
node_modules/
18+
.mypy_cache/
19+
.pytest_cache/
4720
.coverage
21+
coverage/
4822
htmlcov/
49-
.coverage.*
50-
.coverage.xml
51-
coverage.xml
52-
53-
# Testing
54-
.pytest_cache/
55-
.mypy_cache/
56-
57-
# Database
58-
*.sqlite
59-
*.db
60-
61-
# OS
62-
.DS_Store
63-
Thumbs.db
6423
```

0 commit comments

Comments
 (0)