feat(auth): add disable-2fa command (#38275)

This PR adds the `gitea admin user disable-2fa` command to disable 2FA
for a user

When the only admin in the instance loses their 2FA credentials, this
command can be used to disable 2FA, allowing them to log in and reset
it.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
Zettat123
2026-07-01 12:33:16 +02:00
committed by GitHub
co-authored by Giteabot
parent 77e221ffaf
commit 67a6bd7fc0
6 changed files with 244 additions and 20 deletions
+1
View File
@@ -18,6 +18,7 @@ func newUserCommand() *cli.Command {
microcmdUserDelete(),
newUserGenerateAccessTokenCommand(),
microcmdUserMustChangePassword(),
microcmdUserDisableTwoFactor(),
},
}
}