feat(auth): add TOTP 2FA setup and login verification
Some checks failed
CI / test (push) Failing after 21s

- add user twofa fields and migration

- add 2FA setup/enable/disable endpoints

- enforce OTP on login when 2FA enabled

- add web login OTP field and settings UI
This commit is contained in:
2026-03-08 11:43:51 +03:00
parent e685a38be6
commit 27d3340a37
12 changed files with 287 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ class UserRead(UserBase):
bio: str | None = None
email_verified: bool
allow_private_messages: bool
twofa_enabled: bool = False
created_at: datetime
updated_at: datetime