gitea/templates/base
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
..
alert_details.tmpl Fix templating in pull request comparison (#33025) 2024-12-29 01:32:19 +00:00
alert.tmpl Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187) 2025-04-28 15:31:59 -07:00
disable_form_autofill.tmpl Disable form autofill (#17291) 2021-10-19 01:08:41 +03:00
footer_content.tmpl Refactor language menu and dom utils (#32450) 2024-11-08 14:04:24 +08:00
footer.tmpl Remove DataRaceCheck (#29258) 2024-02-19 11:25:58 +00:00
head_navbar.tmpl Prepare common tmpl functions in a middleware (#33957) 2025-03-25 06:17:58 +00:00
head_opengraph.tmpl Avoid unnecessary 500 panic when a commit doesn't exist (#28719) 2024-01-07 18:20:22 +08:00
head_script.tmpl Refactor tmpl and blob_excerpt (#32967) 2024-12-25 00:51:13 +08:00
head_style.tmpl Initial support for colorblindness-friendly themes (#30625) 2024-04-24 00:18:41 +08:00
head.tmpl Remove "noscript" tag from html head (#33846) 2025-03-11 00:52:08 +08:00
markup_codepreview.tmpl Fix code block style for code preview (#30298) 2024-04-06 20:07:08 +08:00
modal_actions_confirm.tmpl Refactor tmpl and blob_excerpt (#32967) 2024-12-25 00:51:13 +08:00
paginate.tmpl Only use prev and next buttons for pagination on user dashboard (#33981) 2025-03-23 19:52:43 +00:00