feat: implement two-factor authentication (2FA) support with user login and settings integration

This commit is contained in:
Seefs
2025-08-02 14:53:28 +08:00
parent 78f34a8245
commit c784a70277
14 changed files with 1874 additions and 3 deletions

View File

@@ -251,6 +251,8 @@ func migrateDB() error {
&QuotaData{},
&Task{},
&Setup{},
&TwoFA{},
&TwoFABackupCode{},
)
if err != nil {
return err
@@ -277,6 +279,8 @@ func migrateDBFast() error {
{&QuotaData{}, "QuotaData"},
{&Task{}, "Task"},
{&Setup{}, "Setup"},
{&TwoFA{}, "TwoFA"},
{&TwoFABackupCode{}, "TwoFABackupCode"},
}
// 动态计算migration数量确保errChan缓冲区足够大
errChan := make(chan error, len(migrations))