mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:27:31 -05:00 
			
		
		
		
	
						commit
						1934443bff
					
				@ -51,7 +51,7 @@ class TwoFactorController extends BaseController
 | 
				
			|||||||
        $secret = request()->input('secret');
 | 
					        $secret = request()->input('secret');
 | 
				
			||||||
        $oneTimePassword = request()->input('one_time_password');
 | 
					        $oneTimePassword = request()->input('one_time_password');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (! $secret || ! \Google2FA::verifyKey($secret, $oneTimePassword)) {
 | 
					        if (! $secret || ! Google2FA::verifyKey($secret, $oneTimePassword)) {
 | 
				
			||||||
            return response()->json('message' > ctrans('texts.invalid_one_time_password'));
 | 
					            return response()->json('message' > ctrans('texts.invalid_one_time_password'));
 | 
				
			||||||
        } elseif (! $user->google_2fa_secret && $user->phone && $user->confirmed) {
 | 
					        } elseif (! $user->google_2fa_secret && $user->phone && $user->confirmed) {
 | 
				
			||||||
            $user->google_2fa_secret = encrypt($secret);
 | 
					            $user->google_2fa_secret = encrypt($secret);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user