public function onSuccessfulLogin(LoginSuccessEvent
$event): void
{ $passport =
$event->
getPassport();
if (!
$passport->
hasBadge(RememberMeBadge::
class)) { $this->logger?->
debug('Remember me skipped: your authenticator does not support it.',
['authenticator' =>
$event->
getAuthenticator()::
class]);
return;
} // Make sure any old remember-me cookies are cancelled
$this->rememberMeHandler->
clearRememberMeCookie();
/** @var RememberMeBadge $badge */
$badge =
$passport->
getBadge(RememberMeBadge::
class);
if (!
$badge->
isEnabled()) { $this->logger?->
debug('Remember me skipped: the RememberMeBadge is not enabled.'
);
return;
} $this->logger?->
debug('Remember-me was requested; setting cookie.'
);