Auth0 Home Blog Docs

Class OAuth2\Client not found



I’m trying to get version 1.x of auth0-drupal module working with Drupal 7. Everything works fine until I log in and return to the callback page, at which point I get

Fatal error: Class ‘OAuth2\Client’ not found in /[path]/sites/all/modules/contrib/auth0-drupal/vendor/auth0/auth0-php/src/Auth0.php on line 206

The OAuth2/Client class is defined in /[path]/sites/all/modules/contrib/auth0-drupal/vendor/adoy/oauth2/src/OAuth2/Client.php . Any idea why it’s not autoloading?

I posted this question already at , but an Auth0 rep recommended I post it here as well. Thank you in advance.


The problem turned out to be that the vendor directory was not writeable on the hosting server. I was able to use Composer Manager module to relocate it to a writeable part of the filesystem.