You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -125,6 +128,10 @@ public function login(UserInterface $user, ?string $authenticatorName = null, ?s
125
128
thrownewLogicException('Unable to login as the current route is not covered by any firewall.');
126
129
}
127
130
131
+
if (in_array($authenticatorName, self::SECURITY_LOGIN_EXCLUSIONS)) {
132
+
thrownewLogicException(sprintf('The "%s" authenticator is not allowed to be used with the "%s" method. Use a different authenticator.', $authenticatorName, __METHOD__));
thrownewLogicException(sprintf('No authenticator was found for the firewall "%s".', $firewallName));
195
201
}
196
-
if (1 < \count($authenticatorIds)) {
197
-
thrownewLogicException(sprintf('Too many authenticators were found for the current firewall "%s". You must provide an instance of "%s" to login programmatically. The available authenticators for the firewall "%s" are "%s".', $firewallName, AuthenticatorInterface::class, $firewallName, implode('" ,"', $authenticatorIds)));
202
+
if (1 < \count($availableAuthenticators)) {
203
+
thrownewLogicException(sprintf('Too many authenticators were found for the current firewall "%s". You must provide an instance of "%s" to login programmatically. The available authenticators for the firewall "%s" are "%s".', $firewallName, AuthenticatorInterface::class, $firewallName, implode('" ,"', $availableAuthenticators)));
$this->expectExceptionMessage('The "remember_me" authenticator is not allowed to be used with the "Symfony\Bundle\SecurityBundle\Security::login" method. Use a different authenticator.');
0 commit comments