Closed
Description
Hi, i have multiple authenticators written with the new Auth manager system, here a part of my security.yaml config
main:
lazy: true
form_login:
provider: app_user_provider
login_path: app_login
check_path: app_login
enable_csrf: true
default_target_path: auth_success_redirect
custom_authenticators:
- App\Security\Authenticator\AuthAuthenticator
entry_point: form_login
remember_me:
secret: '%env(APP_SECRET)%'
always_remember_me: true
secure: true
logout:
path: app_logout
I have deprecation since symfony 5.4
Since symfony/security-bundle 5.4: Not configuring explicitly the provider for the "custom_authenticators" listener on "main" firewall is deprecated because it's ambiguous as there is more than one registered provider
I don't have provider for this firewall, i only have the authenticate function in the authenticator
public function authenticate(Request $request): Passport
{
$client = $this->getClient();
$accessToken = $this->fetchAccessToken($client);
return new SelfValidatingPassport(
new UserBadge($accessToken, function() use ($accessToken, $client) {
$authUser = $client->fetchUserFromToken($accessToken);
$user = $this->userRepository->findOneByAuthId($authUser->getId()) ?: (new User());
$this->authManager->synchroUserData($user, $authUser->getId());
return $user;
}), [new RememberMeBadge(),],
);
}
So what should i do to remove this deprecation ? Is there something i'm missing...
Metadata
Metadata
Assignees
Labels
No labels