No data being returned in Laravel 11 upgrade to Auth0

We are upgrading our Laravel application from version 9 to version 11, and as such we are upgrading the auth0 packages as well. Previously to this upgrade, it has been working perfectly well, but we’re experiencing some issues currently.

We have upgraded the Auth0 dependencies in the project as follows.

"auth0/auth0-php": "^8.11.1",
"auth0/login": "^7.14.0",

We also have the following PSR-7, PSR-17 and PSR-18 compliant packages installed for HTTP Client, Factory and Messages

"guzzlehttp/guzzle": "^7.8",
"guzzlehttp/psr7": "^2.6",

We’ve updated the configuration files, but we’re finding that the HTTP client isn’t returning the body of what it’s requesting and therefore not functioning as expected. If we update the vendor package code to use Laravel’s HTTP facade it retrieves the data correctly and logging in for example works.

To exemplify one of the issues we’re having, in vendor/auth0/auth0-php/src/Token/Verifier.php this line

$keys = (new HttpRequest($this->configuration, HttpClient::CONTEXT_GENERIC_CLIENT, 'get', $path, [], $scheme . '://' . $host, $this->mockedHttpResponses))->call();

When passed to

HttpResponse::decodeContent($keys)

Returns null as the body is empty. However, if we replace this with a laravel HTTP call the data is returned without issue.

I’m not quite sure why it’s not working. The attached screenshot of the configuration seems to connect to the guzzle implementation, but I’m a bit lost on what I should try next. Has anyone else experienced such issues?

For those of you that come across this issue in the future, the reason it wasn’t working for me is that while we had a PSR18 client installed, we also had Http\Mock\Client which it was picking in discovery.

To resolve this issue, we specified in the config the following, which resolved our issue

 ...

 'guards' => [
     'default' => [
         'httpClient' => new \GuzzleHttp\Client(),

 ...