PHPackages                             kalley/laravel-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. kalley/laravel-oauth-client

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

kalley/laravel-oauth-client
===========================

OAuth 1.0 and 2.0 Client for Laravel

91.4k5[2 issues](https://github.com/kalley/laravel-oauth-client/issues)PHP

Since Dec 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/kalley/laravel-oauth-client)[ Packagist](https://packagist.org/packages/kalley/laravel-oauth-client)[ RSS](/packages/kalley-laravel-oauth-client/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

OAuth 1.0 and 2.0 Client for Laravel
====================================

[](#oauth-10-and-20-client-for-laravel)

This package is built upon [The PHP League's](https://github.com/thephpleague) OAuth Client libraries.

It provides facades for the packaged servers/providers and unites the API across both.

*I understand that may seem strange, since there is different language associated with each version, but it makes it easier to use both*

### Disclaimer

[](#disclaimer)

This has only been tested using authentication and getting user details. I haven't attempted to use these to make further API calls yet.

Requirements
------------

[](#requirements)

*from [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client)*

The following versions of PHP are supported.

- PHP 5.4
- PHP 5.5
- PHP 5.6
- HHVM

Servers/Providers included
--------------------------

[](#serversproviders-included)

- OAuth 1.0
    - Bitbucket
    - Tumblr
    - Twitter
- OAuth 2.0
    - Eventbrite
    - Facebook
    - Github
    - Google
    - Instagram
    - LinkedIn
    - Microsoft

Package Installation
--------------------

[](#package-installation)

Add the following line to your composer.json file:

```
"kalley/laravel-oauth-client": "dev-master"
```

or run `composer require kalley/laravel-oauth-client:dev-master` from the command line

Add this line of code to the `providers` array located in your `app/config/app.php` file:

```
'Kalley\LaravelOauthClient\LaravelOauthClientServiceProvider',
```

### Configuration

[](#configuration)

In order to use the OAuth Client, publish its configuration first

```
php artisan config:publish kalley/laravel-oauth-client

```

Afterwards edit the file `app/config/packages/kalley/laravel-oauth-client/oauth-client.php` to suit your needs.

You will probably want to go ahead and add Facades for the providers you're planning to use as well. For example, if you were integration Facebook:

```
'Facebook' => 'Kalley\LaravelOauthClient\Facades\FacebookFacade',

```

and so on. If you don't do this, you can call them using `App::make('oauth-client.facebook')`;

These will return an instance of the `AbstractOAuthClient` class.

### Migrations

[](#migrations)

This package comes with all the migrations you need to run a full featured oauth2 server. Run:

```
php artisan oauth-client:migrations

```

Usage
-----

[](#usage)

#### User authorization

[](#user-authorization)

This will take care of everything, including the redirection to the service

```
Facebook::authorize();

```

#### Getting the access token

[](#getting-the-access-token)

```
For OAuth 1.0:
```
$token = Twitter::getAccessToken(['oauth_token' => Input::get('oauth_token'), 'oauth_verifier' => Input::get('oauth_verifier')]);
```

For OAuth 2.0:
```
$token = Facebook::getAccessToken(Input::get('code'));
```

```

#### Getting user details

[](#getting-user-details)

**You will need to get the access token first.**

```
$social_user = Facebook::getUserDetails();

```

After that, it's pretty much up to you at this point. If you want to get a better idea of what is going on, please take a look at the required packages:

- [OAuth 1.0 Client](https://github.com/thephpleague/oauth1-client)
- [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client)

Support
-------

[](#support)

Bugs and feature request are tracked on [GitHub](https://github.com/kalley/laravel-oauth-client/issues)

License
-------

[](#license)

This package is released under the MIT License.

Credit
------

[](#credit)

The code on which this package is based is primarily developed and maintained by [Alex Bilbie](https://twitter.com/alexbilbie).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc4dd05bff094bcd50619445c563e4d9d8e9b733880944cb9651bbc2ac26391d?d=identicon)[kalley](/maintainers/kalley)

---

Top Contributors

[![kalley](https://avatars.githubusercontent.com/u/289053?v=4)](https://github.com/kalley "kalley (2 commits)")

### Embed Badge

![Health badge](/badges/kalley-laravel-oauth-client/health.svg)

```
[![Health](https://phpackages.com/badges/kalley-laravel-oauth-client/health.svg)](https://phpackages.com/packages/kalley-laravel-oauth-client)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
