# Class OAuth2\\Client not found

**URL:** <https://community.auth0.com/t/class-oauth2-client-not-found/6298>\
**Category:** Get Help\
**Tags:** autoloader, drupal, php\
**Created:** [April 20, 2017, 10:09pm UTC](https://community.auth0.com/t/class-oauth2-client-not-found/6298 "2017-04-20T22:09:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![interdep.web](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@interdep.web](https://community.auth0.com/u/interdep.web)\
**Post date:** [April 20, 2017, 10:09pm UTC](https://community.auth0.com/t/class-oauth2-client-not-found/6298/1 "2017-04-20T22:09:23Z")

</div>

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 [https://github.com/auth0/auth0-drupal/issues/72](https://github.com/auth0/auth0-drupal/issues/72) , but an Auth0 rep recommended I post it here as well. Thank you in advance.

---

<div class="post-metadata">

**Author:** ![ben2](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@ben2](https://community.auth0.com/u/ben2)\
**Post date:** [May 5, 2017, 2:09am UTC](https://community.auth0.com/t/class-oauth2-client-not-found/6298/2 "2017-05-05T02:09:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/class-oauth2-client-not-found/6298/3 "2018-03-02T05:53:23Z")

</div>


