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

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

alhad15/oauth-7-laravel
=======================

OAuth Service Provider for Laravel 5

1.0.5(11y ago)05MITPHPPHP &gt;=5.3

Since Sep 18Pushed 5y agoCompare

[ Source](https://github.com/alhad15/oauth-7-laravel)[ Packagist](https://packagist.org/packages/alhad15/oauth-7-laravel)[ Docs](https://github.com/artdarek/oauth-4-laravel)[ RSS](/packages/alhad15-oauth-7-laravel/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

OAuth wrapper for Laravel 5
===========================

[](#oauth-wrapper-for-laravel-5)

oauth-5-laravel is a simple laravel 5 service provider (wrapper) for [Lusitanian/PHPoAuthLib](https://github.com/Lusitanian/PHPoAuthLib)which provides oAuth support in PHP 5.4+ and is very easy to integrate with any project which requires an oAuth client.

Was first developed by [Artdarek](https://github.com/artdarek/oauth-4-laravel) for Laravel 4 and I ported it to Laravel 5.

---

- [Supported services](#supported-services)
- [Installation](#installation)
- [Registering the Package](#registering-the-package)
- [Configuration](#configuration)
- [Usage](#usage)
- [Basic usage](#basic-usage)
- [More usage examples](#more-usage-examples)

Supported services
------------------

[](#supported-services)

The library supports both oAuth 1.x and oAuth 2.0 compliant services. A list of currently implemented services can be found below. More services will be implemented soon.

Included service implementations:

- OAuth1
    - BitBucket
    - Etsy
    - FitBit
    - Flickr
    - Scoop.it!
    - Tumblr
    - Twitter
    - Xing
    - Yahoo
- OAuth2
    - Amazon
    - BitLy
    - Box
    - Dailymotion
    - Dropbox
    - Facebook
    - Foursquare
    - GitHub
    - Google
    - Harvest
    - Heroku
    - Instagram
    - LinkedIn
    - Mailchimp
    - Microsoft
    - PayPal
    - Pocket
    - Reddit
    - RunKeeper
    - SoundCloud
    - Vkontakte
    - Yammer
- more to come!

To learn more about Lusitanian/PHPoAuthLib go [here](https://github.com/Lusitanian/PHPoAuthLib)

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

[](#installation)

Add oauth-5-laravel to your composer.json file:

```
"require": {
  "oriceon/oauth-5-laravel": "dev-master"
}

```

Use composer to install this package.

```
$ composer update

```

### Registering the Package

[](#registering-the-package)

Register the service provider within the `providers` array found in `config/app.php`:

```
'providers' => [
	// ...

	Artdarek\OAuth\OAuthServiceProvider::class,
]
```

Add an alias within the `aliases` array found in `config/app.php`:

```
'aliases' => [
	// ...

	'OAuth'     => Artdarek\OAuth\Facade\OAuth::class,
]
```

Configuration
-------------

[](#configuration)

There are two ways to configure oauth-5-laravel. You can choose the most convenient way for you. You can use package config file which can be generated through command line by artisan (option 1) or you can simply create a config file called `oauth-5-laravel.php` in your `config` directory (option 2).

#### Option 1

[](#option-1)

Create configuration file for package using artisan command

```
$ php artisan vendor:publish --provider="Artdarek\OAuth\OAuthServiceProvider"

```

#### Option 2

[](#option-2)

Create configuration file manually in config directory `config/oauth-5-laravel.php` and put there code from below.

```
