mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	@@ -129,11 +129,7 @@ func aesDecrypt(key, text []byte) ([]byte, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// NewTwoFactor creates a new two-factor authentication token.
 | 
					// NewTwoFactor creates a new two-factor authentication token.
 | 
				
			||||||
func NewTwoFactor(t *TwoFactor) error {
 | 
					func NewTwoFactor(t *TwoFactor) error {
 | 
				
			||||||
	_, err := t.GenerateScratchToken()
 | 
						_, err := x.Insert(t)
 | 
				
			||||||
	if err != nil {
 | 
					 | 
				
			||||||
		return err
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	_, err = x.Insert(t)
 | 
					 | 
				
			||||||
	return err
 | 
						return err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user