Skip to content

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

Merged
bircni merged 12 commits into
go-gitea:mainfrom
Zettat123:disable-2fa-cmd
Jul 1, 2026
Merged

feat(auth): add disable-2fa command#38275
bircni merged 12 commits into
go-gitea:mainfrom
Zettat123:disable-2fa-cmd

Conversation

@Zettat123

Copy link
Copy Markdown
Contributor

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.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 29, 2026
@github-actions github-actions Bot added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jun 29, 2026
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 29, 2026
Comment thread cmd/admin_user_disable_2fa.go Outdated
Comment thread models/auth/twofactor.go Outdated
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 30, 2026
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 30, 2026
@lunny lunny modified the milestones: 1.27.0, 1.28.0 Jun 30, 2026
@bircni bircni changed the title feat: add disable-2fa command feat(auth): add disable-2fa command Jul 1, 2026
@bircni
bircni merged commit 67a6bd7 into go-gitea:main Jul 1, 2026
25 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 1, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 4, 2026
* 'main' of https://github.com/go-gitea/gitea: (24 commits)
  [skip ci] Updated translations via Crowdin
  fix(actions): make runner list pagination order deterministic (go-gitea#38313)
  fix(release): gate draft release attachments on web download endpoints (go-gitea#38318)
  ci(snap): build snaps natively instead of on launchpad (go-gitea#38312)
  chore: update `eslint-plugin-unicorn` to v70 (go-gitea#38310)
  feat(webhook): support Telegram Bot API 10.1 Rich Messages (go-gitea#38298)
  chore(snap): drop `armhf` build (go-gitea#38311)
  fix(actions): prevent chevron overlap with log text when timestamps are enabled (go-gitea#38227)
  chore: upgrade `go-swagger` to v0.35.0 and enforce zero swagger warnings (go-gitea#38299)
  fix: Improve since/until when counting commits for X-Total-Count (go-gitea#38243)
  chore: remove eslint-plugin-array-func (go-gitea#38294)
  docs: Welcome Zettat to TOC (go-gitea#38303)
  fix(workflows): branch protection status checks fail when workflow uses on: paths filter (go-gitea#38237)
  chore: update node.js to v26 (go-gitea#38285)
  refactor: replace `vue-bar-graph` dependency with inlined SVG chart (go-gitea#38292)
  feat(auth): add `disable-2fa` command (go-gitea#38275)
  fix(oauth2): persist linkAccountData during auto-link 2FA flow (go-gitea#38274)
  fix(actions): allow Actions bot to push to protected branches (go-gitea#38284)
  [skip ci] Updated translations via Crowdin
  feat: extend <video> tag allowed attributes (go-gitea#38279)
  ...
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 4, 2026
* main: (24 commits)
  [skip ci] Updated translations via Crowdin
  fix(actions): make runner list pagination order deterministic (go-gitea#38313)
  fix(release): gate draft release attachments on web download endpoints (go-gitea#38318)
  ci(snap): build snaps natively instead of on launchpad (go-gitea#38312)
  chore: update `eslint-plugin-unicorn` to v70 (go-gitea#38310)
  feat(webhook): support Telegram Bot API 10.1 Rich Messages (go-gitea#38298)
  chore(snap): drop `armhf` build (go-gitea#38311)
  fix(actions): prevent chevron overlap with log text when timestamps are enabled (go-gitea#38227)
  chore: upgrade `go-swagger` to v0.35.0 and enforce zero swagger warnings (go-gitea#38299)
  fix: Improve since/until when counting commits for X-Total-Count (go-gitea#38243)
  chore: remove eslint-plugin-array-func (go-gitea#38294)
  docs: Welcome Zettat to TOC (go-gitea#38303)
  fix(workflows): branch protection status checks fail when workflow uses on: paths filter (go-gitea#38237)
  chore: update node.js to v26 (go-gitea#38285)
  refactor: replace `vue-bar-graph` dependency with inlined SVG chart (go-gitea#38292)
  feat(auth): add `disable-2fa` command (go-gitea#38275)
  fix(oauth2): persist linkAccountData during auto-link 2FA flow (go-gitea#38274)
  fix(actions): allow Actions bot to push to protected branches (go-gitea#38284)
  [skip ci] Updated translations via Crowdin
  feat: extend <video> tag allowed attributes (go-gitea#38279)
  ...
zeekay pushed a commit to hanzoai/git that referenced this pull request Jul 26, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/authentication type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants