Closed pps1 closed 2 years ago
I receive the following error when using the Azure AD client adapter in a Symfony 5.4 application:
Authenticator code snippet:
class AzureAuthenticator extends OAuth2Authenticator { use LoggableTrait; public function __construct( private ClientRegistry $clientRegistry, private EntityManagerInterface $entityManager, private RouterInterface $router, private ?LoggerInterface $logger ) { } //... public function authenticate(Request $request): Passport { $client = $this->clientRegistry->getClient('azure'); /** @var AccessToken $accessToken */ $accessToken = $this->fetchAccessToken($client); $tokenString = $accessToken->getToken(); //... }
Config:
knpu_oauth2_client: clients: # will create service: "knpu.oauth2.client.azure" # an instance of: KnpU\OAuth2ClientBundle\Client\Provider\AzureClient # composer require thenetworg/oauth2-azure azure: type: azure client_id: '%env(OAUTH_AZURE_CLIENT_ID)%' client_secret: '%env(OAUTH_AZURE_CLIENT_SECRET)%' tenant: '%env(OAUTH_AZURE_TENANT)%' # common, organizations, consumers, or tenant id redirect_route: login_azure_check redirect_params: { } use_state: false scope: - openid - email - profile
Versions:
Symfony 5.4.9 knpuniversity/oauth2-client-bundle v2.10.1 thenetworg/oauth2-azure v2.1.0 firebase/php-jwt v6.2.0
Any thoughts on what I may be doing wrong here? Thank you!
This is a duplicate of https://github.com/TheNetworg/oauth2-azure/issues/161
I receive the following error when using the Azure AD client adapter in a Symfony 5.4 application:
Authenticator code snippet:
Config:
Versions:
Any thoughts on what I may be doing wrong here? Thank you!