thephpleague / oauth2-client

Easy integration with OAuth 2.0 service providers.
http://oauth2-client.thephpleague.com
MIT License
3.66k stars 752 forks source link

Invalid response received from Authorization Server. Expected JSON #1031

Open MH-Shakil38 opened 5 months ago

MH-Shakil38 commented 5 months ago

\vendor\league\oauth2-client\src\Provider\AbstractProvider.php

$oauthClient->getAccessToken('authorization_code', [ 'code' => $authCode, ]);

After calling this issues. Getting the error : Invalid response received from Authorization Server. Expected JSON

plierschpl commented 3 months ago

Have you checked your response in the abstractProvider?

Maybe the same mistake as mine.

I debugged the $response of the getAccessToken (AbstractProvider.php) method and encountered the following error