chore: implement 2fa auth (#2968)
Some checks are pending
Build and Release 3X-UI / build (386) (push) Waiting to run
Build and Release 3X-UI / build (amd64) (push) Waiting to run
Build and Release 3X-UI / build (arm64) (push) Waiting to run
Build and Release 3X-UI / build (armv5) (push) Waiting to run
Build and Release 3X-UI / build (armv6) (push) Waiting to run
Build and Release 3X-UI / build (armv7) (push) Waiting to run
Build and Release 3X-UI / build (s390x) (push) Waiting to run

* chore: implement 2fa auth

from #2786

* chore: format code

* chore: replace two factor token input with qr-code

* chore: requesting confirmation of setting/removing two-factor authentication

otpauth library was taken from cdnjs

* chore: revert changes in `ClipboardManager`

don't need it.

* chore: removing twoFactor prop in settings page

* chore: remove `twoFactorQr` object in `mounted` function
This commit is contained in:
Shishkevich D.
2025-05-08 21:20:58 +07:00
committed by GitHub
parent d39ccf4b8f
commit fe3b1c9b52
31 changed files with 452 additions and 302 deletions

3
go.mod
View File

@@ -15,8 +15,10 @@ require (
github.com/robfig/cron/v3 v3.0.1
github.com/shirou/gopsutil/v4 v4.25.3
github.com/valyala/fasthttp v1.61.0
github.com/xlzd/gotp v0.1.0
github.com/xtls/xray-core v1.250306.1-0.20250430044058-87ab8e512882
go.uber.org/atomic v1.11.0
golang.org/x/crypto v0.37.0
golang.org/x/text v0.24.0
google.golang.org/grpc v1.72.0
gorm.io/driver/sqlite v1.5.7
@@ -84,7 +86,6 @@ require (
go.uber.org/mock v0.5.2 // indirect
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
golang.org/x/arch v0.16.0 // indirect
golang.org/x/crypto v0.37.0 // indirect
golang.org/x/mod v0.24.0 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/sync v0.13.0 // indirect