-
-
Notifications
You must be signed in to change notification settings - Fork 25
Add Two-Factor Authentication (2FA) with TOTP support #43
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
Conversation
- Add pragmarx/google2fa-qrcode package for TOTP - Create migration for 2FA fields in users table - Update User model with 2FA methods - Create TwoFactor settings Livewire component - Create TwoFactorChallenge login component - Add 2FA views for setup and challenge - Update Login component to handle 2FA flow - Add 2FA routes and navigation Co-authored-by: mortenebak <[email protected]>
- Add TwoFactorTest for settings component - Add TwoFactorAuthenticationTest for login flow - Add UserTwoFactorTest for model methods - Test enable, confirm, disable 2FA - Test recovery codes generation and usage - Test login with 2FA code and recovery code Co-authored-by: mortenebak <[email protected]>
- Create comprehensive TWO_FACTOR_AUTHENTICATION.md guide - Update README with 2FA feature listing - Add user guide, technical details, and FAQ - Document authentication flow and security considerations Co-authored-by: mortenebak <[email protected]>
Prevent exception when two_factor_recovery_codes is null by checking for null before attempting decryption Co-authored-by: mortenebak <[email protected]>
|
@copilot We have some failing tests in TwoFactorTest. Help me fix the issue. |
Renamed two-factor migration from 0001_01_01_000001 to 2026_01_08_000000 to avoid conflict with cache table migration that has the same timestamp. This ensures migrations run in the correct order. Co-authored-by: mortenebak <[email protected]>
Fixed in 711a45c. The issue was a migration timestamp conflict - both the two-factor migration and cache table migration had the same timestamp (0001_01_01_000001), causing the migrations to run in an unpredictable order. Renamed the two-factor migration to use a current timestamp (2026_01_08_000000). Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…e UserFactory with 2FA fields
Fix TwoFactorTest Failures
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.