gitea/routers/web/user/setting
wxiaoguang 0148d03f21
Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187)
Fix #880

Design:

1. A global setting `security.TWO_FACTOR_AUTH`.
* To support org-level config, we need to introduce a better "owner
setting" system first (in the future)
2. A user without 2FA can login and may explore, but can NOT read or
write to any repositories via API/web.
3. Keep things as simple as possible.
* This option only aggressively suggest users to enable their 2FA at the
moment, it does NOT guarantee that users must have 2FA before all other
operations, it should be good enough for real world use cases.
* Some details and tests could be improved in the future since this
change only adds a check and seems won't affect too much.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-28 15:31:59 -07:00
..
security Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187) 2025-04-28 15:31:59 -07:00
account.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
account_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
adopt.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
applications.go feat: Add sorting by exclusive labels (issue priority) (#33206) 2025-04-10 17:18:07 +00:00
block.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
keys.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
oauth2.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
oauth2_common.go refactor organization menu (#33928) 2025-04-10 12:12:55 -07:00
packages.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00
profile.go Improve theme display (#30671) 2025-03-08 21:38:11 +00:00
runner.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
settings.go Add file tree to file view page (#32721) 2025-03-15 16:26:49 +08:00
webhooks.go Refactor template & test related code (#32938) 2024-12-22 15:33:19 +00:00