PHPackages                             werk365/laraveloauthclient - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. werk365/laraveloauthclient

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

werk365/laraveloauthclient
==========================

Multi purpose OAuth client to use in Laravel

1.0.5(3y ago)2127MITPHP

Since Jan 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/365Werk/Laravel-OAuth-Client)[ Packagist](https://packagist.org/packages/werk365/laraveloauthclient)[ Docs](https://github.com/365Werk/Laravel-OAuth-Client)[ RSS](/packages/werk365-laraveloauthclient/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (3)Versions (13)Used By (0)

Laravel OAuth Client
====================

[](#laravel-oauth-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cbc43e39eb9a9621833695ffdb1437ab7f58674d7cee589262acbfe45e7049fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7765726b3336352f6c61726176656c6f61757468636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/werk365/laraveloauthclient)[![Total Downloads](https://camo.githubusercontent.com/e2dbad67e9ac201023a37d9ddba182ed2a18f8e89c54042c4f8102159462df88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7765726b3336352f6c61726176656c6f61757468636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/werk365/laraveloauthclient)[![StyleCI](https://camo.githubusercontent.com/5205c2a907742705842457ed27ac456589ec71174b2aa476ba62e59c45213a10/68747470733a2f2f7374796c6563692e696f2f7265706f732f3332383634333030352f736869656c64)](https://styleci.io/repos/328643005)

Multi-purpose OAuth client, configurable for a sleuth of providers through the config file.

Installation
------------

[](#installation)

Via Composer

```
$ composer require werk365/laraveloauthclient
```

Usage
-----

[](#usage)

Publish the config

```
$ php artisan vendor:publish --provider="Werk365\LaravelOAuthClient\LaravelOAuthClientServiceProvider"
```

Configure the config using the provided example.

Then use the package as follows:

```
use Werk365\LaravelOAuthClient\LaravelOAuthClient as OAuth;

// ...

$oauth = new OAuth("vendorname");

// Returns array defined in config
$response = $oauth->getToken($code);

//Returns array defined in config
$response = $oauth->getInfo($accesstoken);

//Returns array defined in config
$response = $oauth->refreshToken($refreshtoken);
```

Config
------

[](#config)

Example of config provided, edit values to match vendor spec:

```
