PHPackages                             logicly/easy-oauth-client - 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. logicly/easy-oauth-client

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

logicly/easy-oauth-client
=========================

Multi purpose OAuth2 client to use in Laravel

v1.0.1(2y ago)016MITPHPPHP ^8.1

Since Apr 16Pushed 2y agoCompare

[ Source](https://github.com/logiclybv/easy-oauth-client)[ Packagist](https://packagist.org/packages/logicly/easy-oauth-client)[ Docs](https://github.com/logiclybv/easy-oauth-client)[ RSS](/packages/logicly-easy-oauth-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Easy OAuth2 Client for Laravel
==============================

[](#easy-oauth2-client-for-laravel)

Multipurpose OAuth2 client, configurable for a sleuth of providers through the config file.

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

[](#installation)

Via Composer

```
$ composer require logicly/easy-oauth-client
```

Usage
-----

[](#usage)

Publish the config

```
$ php artisan provider:publish --provider="Logicly\EasyOAuthClient\EasyOAuthClientServiceProvider"
```

Configure the config using the provided example.

Then use the package as follows:

```
use Logicly\EasyOAuthClient\Client;

// ...

$oAuthClient = new Client("providername");

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

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

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

Config
------

[](#config)

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

```
