Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>tags/v14.0.0beta4
@@ -334,7 +334,7 @@ class LoginController extends Controller { | |||
if ($this->twoFactorManager->isTwoFactorAuthenticated($loginResult)) { | |||
$this->twoFactorManager->prepareTwoFactorLogin($loginResult, $remember_login); | |||
$providers = $this->twoFactorManager->getProviderSet($loginResult)->get3rdPartyProviders(); | |||
$providers = $this->twoFactorManager->getProviderSet($loginResult)->getPrimaryProviders(); | |||
if (count($providers) === 1) { | |||
// Single provider, hence we can redirect to that provider's challenge page directly | |||
/* @var $provider IProvider */ |
@@ -70,7 +70,7 @@ class ProviderSet { | |||
/** | |||
* @return IProvider[] | |||
*/ | |||
public function get3rdPartyProviders(): array { | |||
public function getPrimaryProviders(): array { | |||
return array_filter($this->providers, function(IProvider $provider) { | |||
return !($provider instanceof BackupCodesProvider); | |||
}); |
@@ -64,7 +64,7 @@ class ProviderSetTest extends TestCase { | |||
$set = new ProviderSet([$p2, $p1], false); | |||
$this->assertEquals($expected, $set->get3rdPartyProviders()); | |||
$this->assertEquals($expected, $set->getPrimaryProviders()); | |||
} | |||
public function testGetProvider() { |