gitea/services/forms
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
..
admin.go Add option to set language in admin user view (#28449) 2024-03-02 22:55:02 +01:00
auth_form.go Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187) 2025-04-28 15:31:59 -07:00
org.go Fix: Allow org team names of length 255 in create team form (#31564) 2024-07-10 02:15:17 +00:00
package_form.go Add Arch package registry (#32692) 2024-12-04 23:09:07 +00:00
repo_branch_form.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
repo_form_test.go Add API routes to lock and unlock issues (#34165) 2025-04-21 00:43:43 +00:00
repo_form.go Add API routes to lock and unlock issues (#34165) 2025-04-21 00:43:43 +00:00
repo_tag_form.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
runner.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
user_form_auth_openid.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
user_form_hidden_comments.go Issue time estimate, meaningful time tracking (#23113) 2024-12-05 13:07:53 +00:00
user_form_test.go Improve "generate new access token" form (#33730) 2025-02-27 19:40:12 +00:00
user_form.go Added Description Field for Secrets and Variables (#33526) 2025-03-17 19:24:54 +00:00