Closed garak closed 1 year ago
Please share your configuration & more details cause this should be fixed already, that OAuthProvider
IIRC should not be called in new auth with enable_authenticator_manager: true
.
Here it is:
security:
enable_authenticator_manager: true
firewalls:
my_firewall:
pattern: ^/
oauth:
login_path: /login
failure_path: /login
oauth_user_provider:
service: My\Service\Implementing\OAuthAwareUserProviderInterface
provider: My\Service\Implementing\OAuthAwareUserProviderInterface
logout: ~
Same deprecation warning here :
1x: The "HWI\Bundle\OAuthBundle\Security\Core\Authentication\Provider\OAuthProvider" class implements "Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface" that is deprecated since Symfony 5.3, use the new authenticator system instead.
with security.enable_authenticator_manager: true
and a security.firewalls.main.oauth.oauth_user_provider.service
implementing OAuthAwareUserProviderInterface
.
bin/console debug:container hwi_oauth
Information for Service "hwi_oauth.authentication.provider.oauth"
=================================================================
---------------- ----------------------------------------------------------------------------
Option Value
---------------- ----------------------------------------------------------------------------
Service ID hwi_oauth.authentication.provider.oauth
Class HWI\Bundle\OAuthBundle\Security\Core\Authentication\Provider\OAuthProvider
Tags -
Public no
Synthetic no
Lazy no
Shared yes
Abstract no
Autowired no
Autoconfigured no
---------------- ----------------------------------------------------------------------------
I think this is because hwi_oauth.authentication.provider.oauth
is registered here:
https://github.com/hwi/HWIOAuthBundle/blob/8af42deee20f76848def1e7f279df8fa42fbc0f8/Resources/config/oauth.xml#L18
even if it's not used (aka new authentication system is used). This may cause an error after upgrading to Symfony 6, when class no longer exists. Maybe we can register this service conditionally?
Similarly to issue #1641, the
AuthenticationProviderInterface
was deprecated in Symfony 5.3.OAuthProvider
is currently implementing it.