mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-09 16:10:48 +02:00
- Added support for Two-Factor Authentication, including setup, verification, and disabling features. - Introduced new components for 2FA setup and verification, enhancing user security. - Updated user model to include fields for 2FA secret, status, and backup codes. - Created migration to add necessary database fields for 2FA. - Enhanced authentication handlers to manage 2FA processes during login and profile updates. - Updated routes to include 2FA-related endpoints for setup and verification.
18 lines
358 B
Go
18 lines
358 B
Go
package migrations
|
|
|
|
import (
|
|
"github.com/go-gormigrate/gormigrate/v2"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// InitMigrations initializes the migrations
|
|
func InitMigrations(db *gorm.DB) *gormigrate.Gormigrate {
|
|
migrations := []*gormigrate.Migration{
|
|
InitialSchema(),
|
|
UpdateGDriveType(),
|
|
Add2FA(),
|
|
}
|
|
|
|
return gormigrate.New(db, gormigrate.DefaultOptions, migrations)
|
|
}
|