Providers#

You'll see that we have a clients folder that houses all the OAuth clients that extend from League\OAuth2\Client\Provider\AbstractProvider. These have been collected from various sources, or developed ourselves into this monorepo to allow mass-adoption of these providers in your own plugins. Otherwise, we'd need to include tens of different packages in an install, deal with conflicts, etc. These are now namespaced to verbb\auth\clients\* to convenience, but they shouldn't be used in your own modules.

All credit to the original authors of these clients.

Instead of referencing the client in your plugins, you should reference our Provider class. These are a thin layer over the client that provide some additional structure. These are namespaced to verbb\auth\providers\*, and extend the clients.

Providers add a compulsary getBaseApiUrl() function that returns a string for the base URL to the provider API. This is so we can create consistent HTTP clients for use in your plugins. Each provider class should either extend the verbb\auth\base\Provider class, or where not possible to extend, include the verbb\auth\base\ProviderTrait.

Adding your own#

You're more than welcome to submit a PR with another provider for us to support. You'll need to create a client folder of classes (as if you were submitting a package to league/oauth2-client) and a provider class. Take a look at the many examples for how to get started. Explaining the league/oauth2-client APIs are beyond the scope of this documentation.

Supported providers#

These providers extend any league/oauth1-client (opens new window) or league/oauth2-client (opens new window) packages, so if you would like to register your own, you can. Pull Requests are also most welcome to add support for any provider.