From fe3b1c9b52f584b0f045907585b206344fed55db Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Thu, 8 May 2025 21:20:58 +0700 Subject: chore: implement 2fa auth (#2968) * 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 --- web/entity/entity.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/entity/entity.go') diff --git a/web/entity/entity.go b/web/entity/entity.go index 872901b8..543b80e0 100644 --- a/web/entity/entity.go +++ b/web/entity/entity.go @@ -38,7 +38,8 @@ type AllSetting struct { TgCpu int `json:"tgCpu" form:"tgCpu"` TgLang string `json:"tgLang" form:"tgLang"` TimeLocation string `json:"timeLocation" form:"timeLocation"` - SecretEnable bool `json:"secretEnable" form:"secretEnable"` + TwoFactorEnable bool `json:"twoFactorEnable" form:"twoFactorEnable"` + TwoFactorToken string `json:"twoFactorToken" form:"twoFactorToken"` SubEnable bool `json:"subEnable" form:"subEnable"` SubTitle string `json:"subTitle" form:"subTitle"` SubListen string `json:"subListen" form:"subListen"` -- cgit v1.2.3