This commit is contained in:
James Cole
2020-08-14 09:59:56 +02:00
parent 3dc1050929
commit d4029775ec
8 changed files with 85 additions and 54 deletions

View File

@@ -22,6 +22,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Auth;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\User;
use Illuminate\Http\RedirectResponse;
@@ -35,6 +36,21 @@ use Preferences;
*/
class TwoFactorController extends Controller
{
/**
* Create a new controller instance.
*/
public function __construct()
{
parent::__construct();
$loginProvider = config('firefly.login_provider');
$authGuard = config('firefly.authentication_guard');
if ('eloquent' !== $loginProvider || 'web' !== $authGuard) {
throw new FireflyException('Using external identity provider. Cannot continue.');
}
}
/**
* What to do if 2FA lost?
*