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

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

pepijnsenders/oauth
===================

PHP 5.3+ oAuth 1/2 Library

v0.2.3(12y ago)017MITPHPPHP &gt;=5.3.0

Since Feb 12Pushed 12y agoCompare

[ Source](https://github.com/PepijnSenders/PHPoAuthLib)[ Packagist](https://packagist.org/packages/pepijnsenders/oauth)[ RSS](/packages/pepijnsenders-oauth/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (11)Used By (0)

PHPoAuthLib
===========

[](#phpoauthlib)

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

[![Build Status](https://camo.githubusercontent.com/5cd26e8c06a2a04375b1fc544d75ea26d8fbec9688374b3b633d073f6882ef90/68747470733a2f2f7472617669732d63692e6f72672f4c75736974616e69616e2f5048506f417574684c69622e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Lusitanian/PHPoAuthLib)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/5827f312f7bd7f3dc188ad895ae4e793a705cfbdfc1ebf21beb5607efa6ee452/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c75736974616e69616e2f5048506f417574684c69622f6261646765732f7175616c6974792d73636f72652e706e673f733d63353937366432666566636562353031663064383836633161356266303837653639623434353333)](https://scrutinizer-ci.com/g/Lusitanian/PHPoAuthLib/)[![Latest Stable Version](https://camo.githubusercontent.com/69085236b7eca24760a1af8fd986648538028a70d363f97eb48e0195b44c1778/68747470733a2f2f706f7365722e707567782e6f72672f6c75736974616e69616e2f6f617574682f762f737461626c652e706e67)](https://packagist.org/packages/lusitanian/oauth)[![Total Downloads](https://camo.githubusercontent.com/9cb1403f9b70f19707ac37c87ce74cc89c9c663b7fe0a8e74241bbb58c80e38e/68747470733a2f2f706f7365722e707567782e6f72672f6c75736974616e69616e2f6f617574682f646f776e6c6f6164732e706e67)](https://packagist.org/packages/lusitanian/oauth)

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

[](#installation)

This library can be found on [Packagist](https://packagist.org/packages/lusitanian/oauth). The recommended way to install this is through [composer](http://getcomposer.org).

Edit your `composer.json` and add:

```
{
    "require": {
        "lusitanian/oauth": "~0.2"
    }
}
```

And install dependencies:

```
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
```

Features
--------

[](#features)

- 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 Redis.io (requires PHPRedis) storage mechanisms are included. Implement additional mechanisms by implementing `OAuth\Common\Token\TokenStorageInterface`.

Service support
---------------

[](#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
--------------------------------

[](#included-service-implementations)

- OAuth1
    - Twitter
    - Tumblr
    - FitBit
    - Etsy
    - Flickr
- OAuth2
    - Google
    - Microsoft
    - Facebook
    - GitHub
    - BitLy
    - Yammer
    - SoundCloud
    - Foursquare
    - Instagram
    - LinkedIn
    - Box
    - Vkontakte
    - Amazon
    - PayPal
    - Dropbox
    - Dailymotion
- more to come!

Examples
--------

[](#examples)

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

Usage
-----

[](#usage)

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

Framework Integration
---------------------

[](#framework-integration)

- Lithium: Sébastien Charrier has written [an adapter](https://github.com/scharrier/li3_socialauth) for the library.

Tests
-----

[](#tests)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~24 days

Total

10

Last Release

4614d ago

Major Versions

v0.1.4 → 1.0.x-dev2013-06-19

PHP version history (2 changes)v0.1.0PHP &gt;=5.4.0

1.0.x-devPHP &gt;=5.3.0

### Community

Maintainers

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

---

Top Contributors

[![PeeHaa](https://avatars.githubusercontent.com/u/1330296?v=4)](https://github.com/PeeHaa "PeeHaa (102 commits)")[![hannesvdvreken](https://avatars.githubusercontent.com/u/1410358?v=4)](https://github.com/hannesvdvreken "hannesvdvreken (14 commits)")[![borfast](https://avatars.githubusercontent.com/u/4837?v=4)](https://github.com/borfast "borfast (12 commits)")[![flavioheleno](https://avatars.githubusercontent.com/u/471860?v=4)](https://github.com/flavioheleno "flavioheleno (12 commits)")[![elicwhite](https://avatars.githubusercontent.com/u/249164?v=4)](https://github.com/elicwhite "elicwhite (10 commits)")[![toin0u](https://avatars.githubusercontent.com/u/672421?v=4)](https://github.com/toin0u "toin0u (7 commits)")[![thomaswelton](https://avatars.githubusercontent.com/u/678372?v=4)](https://github.com/thomaswelton "thomaswelton (7 commits)")[![bencorlett](https://avatars.githubusercontent.com/u/181919?v=4)](https://github.com/bencorlett "bencorlett (7 commits)")[![igorw](https://avatars.githubusercontent.com/u/88061?v=4)](https://github.com/igorw "igorw (6 commits)")[![mouhamed](https://avatars.githubusercontent.com/u/3195102?v=4)](https://github.com/mouhamed "mouhamed (6 commits)")[![gigablah](https://avatars.githubusercontent.com/u/471275?v=4)](https://github.com/gigablah "gigablah (5 commits)")[![hakre](https://avatars.githubusercontent.com/u/378849?v=4)](https://github.com/hakre "hakre (3 commits)")[![inakiabt](https://avatars.githubusercontent.com/u/606852?v=4)](https://github.com/inakiabt "inakiabt (3 commits)")[![oblogic7](https://avatars.githubusercontent.com/u/453840?v=4)](https://github.com/oblogic7 "oblogic7 (3 commits)")[![scharrier](https://avatars.githubusercontent.com/u/30788?v=4)](https://github.com/scharrier "scharrier (2 commits)")[![PavloPoliakov](https://avatars.githubusercontent.com/u/839290?v=4)](https://github.com/PavloPoliakov "PavloPoliakov (2 commits)")[![huglester](https://avatars.githubusercontent.com/u/150731?v=4)](https://github.com/huglester "huglester (1 commits)")[![daviddesberg](https://avatars.githubusercontent.com/u/1907815?v=4)](https://github.com/daviddesberg "daviddesberg (1 commits)")[![steve228uk](https://avatars.githubusercontent.com/u/1169297?v=4)](https://github.com/steve228uk "steve228uk (1 commits)")[![strongwazz](https://avatars.githubusercontent.com/u/911315?v=4)](https://github.com/strongwazz "strongwazz (1 commits)")

---

Tags

securityAuthenticationoauthauthorization

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pepijnsenders-oauth/health.svg)

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

###  Alternatives

[lusitanian/oauth

PHP 7.2 oAuth 1/2 Library

1.1k23.2M121](/packages/lusitanian-oauth)[oryzone/oauth-user-data

Extension library for Lusitanian/PHPoAuthLib to extract user profile data from various oAuth providers

4558.6k](/packages/oryzone-oauth-user-data)[and/oauth

Simple and amazing OAuth library with many providers. Just try it out!

4645.2k2](/packages/and-oauth)

PHPackages © 2026

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