mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #2968] [MERGED] chore: implement 2fa auth #5315
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5315
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/2968
Author: @sh1shd
Created: 5/3/2025
Status: ✅ Merged
Merged: 5/8/2025
Merged by: @MHSanaei
Base:
main← Head:feat/2fa📝 Commits (9)
2c53007chore: implement 2fa auth2eb10acMerge branch 'main' into feat/2fa4cea5c3chore: format codeca0cf0bMerge branch 'main' into feat/2fa9e94abachore: replace two factor token input with qr-code37c6f50chore: requesting confirmation of setting/removing two-factor authentication73d5992chore: revert changes inClipboardManager83f2240chore: removing twoFactor prop in settings pagefedcd16chore: removetwoFactorQrobject inmountedfunction📊 Changes
31 files changed (+452 additions, -302 deletions)
View changed files
📝
database/db.go(+2 -4)📝
database/model/model.go(+3 -4)📝
go.mod(+2 -1)📝
go.sum(+2 -0)📝
main.go(+0 -35)📝
web/assets/js/model/setting.js(+2 -1)📝
web/assets/js/util/index.js(+27 -0)➕
web/assets/otpauth/otpauth.umd.min.js(+19 -0)📝
web/controller/index.go(+8 -9)📝
web/controller/setting.go(+0 -29)📝
web/entity/entity.go(+2 -1)📝
web/html/login.html(+10 -10)➕
web/html/modals/two_factor_modal.html(+118 -0)📝
web/html/settings.html(+31 -33)📝
web/html/settings/panel/security.html(+4 -20)📝
web/service/setting.go(+11 -11)📝
web/service/user.go(+28 -50)📝
web/translation/translate.ar_EG.toml(+14 -7)📝
web/translation/translate.en_US.toml(+14 -7)📝
web/translation/translate.es_ES.toml(+14 -7)...and 11 more files
📄 Description
What is the pull request?
This pull request replaces the
secret tokenwith2fa authentication.Two-factor authentication differs from secret token in that a new code is generated every 30 seconds, which cannot be selected using the brute force method. 2FA token can be added to any authentication application (Bitwarden, Google Authenticator, and so on.)
Which part of the application is affected by the change?
Type of Changes
Screenshots
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.