(db *gorm.DB)
| 36 | } |
| 37 | |
| 38 | func newTwoFactorsStore(db *gorm.DB) *TwoFactorsStore { |
| 39 | return &TwoFactorsStore{db: db} |
| 40 | } |
| 41 | |
| 42 | // Create creates a new 2FA token and recovery codes for given user. The "key" |
| 43 | // is used to encrypt and later decrypt given "secret", which should be |