You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3.4 KiB


PHPoAuthLib provides oAuth support in PHP 5.3+ and is very easy to integrate with any project which requires an oAuth client.

Build Status Code Coverage Scrutinizer Quality Score Latest Stable Version Total Downloads


This library can be found on Packagist. The recommended way to install this is through composer.

Edit your composer.json and add:

    "require": {
        "lusitanian/oauth": "~0.3"

And install dependencies:

$ curl -sS | php
$ php composer.phar install


  • PSR-0 compliant for easy interoperability
  • Fully extensible in every facet.
    • You can implement any service with any custom requirements by extending the protocol version's AbstractService implementation.
    • You can use any HTTP client you desire, just create a class utilizing it which implements OAuth\Common\Http\ClientInterface (two implementations are included)
    • You can use any storage mechanism for tokens. By default, session, in-memory and (requires PHPRedis) storage mechanisms are included. Implement additional mechanisms by implementing OAuth\Common\Token\TokenStorageInterface.

Service support

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

Included service implementations

  • OAuth1
    • BitBucket
    • Etsy
    • FitBit
    • Flickr
    • 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!


Examples of basic usage are located in the examples/ directory.


For usage with complete auth flow, please see the examples. More in-depth documentation will come with release 1.0.

Framework Integration

  • Lithium: Sébastien Charrier has written an adapter for the library.
  • Laravel 4: Dariusz Prząda has written a service provider for the library.


  • Extract normalized user data from OAuth Services with the library PHPoAuthUserData by Luciano Mammino


To run the tests, you must install dependencies with composer install --dev