Won't fix OAuth Dropbox API v1

Affected version
2.0.0 Beta 5

Lukas W.

Formerly katsulynx
I'm currently trying to implement some external account services, but running against a wall with dropbox. After two hours of trial and error, I finally noticed that the API version which is called i lusitanian/oauth/src/OAuth/OAuth2/Service/Dropbox.php is still version 1, which is deprecated and has been disabled earlier this year. Although it hasn't been merged yet, there seems to be a patch for this issue available at GitHub. Would it be possible to integrate that patch to the version that ships with XenForo? Otherwise the file would be - bluntly spoken - useless ballast.

Chris D

XenForo developer
Staff member
We generally wouldn't be looking to patch vendor files with changes outside of the scope of the official repo, so we'd actually need to wait until that pull request was merged into the main repo or switch to a different fork (though clearly we'd want to ensure that fork is maintained well).

So I'm not sure we'd fix this. Instead I'd suggest you bringing in the patched service class to within your own add-on.

So for example you'd download the fixed service provider and add it to the following location src/addons/Your/AddOn/ConnectedAccount/Service/DropBox.php and then you would update the namespace, the AbstractService class name (either alias it or change it to OAuth\OAuth2\Service\AbstractService.

You would override getOAuthServiceName() to return the class name of your service, so, Your\AddOn:Service\DropBox.

That should sort it for you.