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

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

carlos-mg89/oauth
=================

PHP 7.2 oAuth 1/2 Library

0.8.17(1y ago)6707.2k—5.9%8[3 issues](https://github.com/carlos-mg89/PHPoAuthLib/issues)7MITPHPPHP ^7.2 || ^8.0

Since Feb 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/carlos-mg89/PHPoAuthLib)[ Packagist](https://packagist.org/packages/carlos-mg89/oauth)[ RSS](/packages/carlos-mg89-oauth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (7)Versions (50)Used By (7)

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

[](#phpoauthlib)

PHPoAuthLib provides oAuth support in PHP 7.2+ and 8.0+. It's very easy to integrate with any project which requires an oAuth client.

[![Build Status](https://camo.githubusercontent.com/c3e8c16ec45f128d985e7940cb8b91ba4d4c806d20deb6f2dea2f62a7c607158/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6361726c6f732d6d6738392f5048506f417574684c69622f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/carlos-mg89/PHPoAuthLib/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/f9b1af7e12e9429847656d7af764c7429c961b2b21fb022f2ecbb6330c68197c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6361726c6f732d6d6738392f5048506f417574684c69622f6261646765732f636f7665726167652e706e673f733d6d6173746572)](https://scrutinizer-ci.com/g/carlos-mg89/PHPoAuthLib/)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/a2e9f21c7bad609f6997bac83239324ce57052dd8419b8a1155d2ca23b5cae01/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6361726c6f732d6d6738392f5048506f417574684c69622f6261646765732f7175616c6974792d73636f72652e706e673f733d6d6173746572)](https://scrutinizer-ci.com/g/carlos-mg89/PHPoAuthLib/)[![Latest Stable Version](https://camo.githubusercontent.com/fe80840b3bfe456f0b3f3f773e5fc88cd70160b5d9037b18d74769539116a5fc/68747470733a2f2f706f7365722e707567782e6f72672f6361726c6f732d6d6738392f6f617574682f762f737461626c652e706e67)](https://packagist.org/packages/carlos-mg89/oauth)[![Total Downloads](https://camo.githubusercontent.com/49997cf0a9e3cbd1206860df0658f99abd3113e45c37534fe16ceff36837e178/68747470733a2f2f706f7365722e707567782e6f72672f6361726c6f732d6d6738392f6f617574682f646f776e6c6f6164732e706e67)](https://packagist.org/packages/carlos-mg89/oauth)

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

[](#installation)

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

```
    composer require carlos-mg89/oauth
```

Features
--------

[](#features)

- PSR-4
- 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
    - 500px
    - BitBucket
    - Etsy
    - FitBit
    - Flickr
    - QuickBooks
    - Scoop.it!
    - Tumblr
    - Twitter
    - Yahoo
- OAuth2
    - Amazon
    - BitLy
    - Bitrix24
    - Box
    - Buffer
    - Dailymotion
    - Delicious
    - Deezer
    - DeviantArt
    - Dropbox
    - Eve Online
    - Facebook
    - Foursquare
    - GitHub
    - Google
    - Harvest
    - Heroku
    - Hubic
    - Instagram
    - Jawbone UP
    - LinkedIn
    - Mailchimp
    - Microsoft
    - Mondo
    - Nest
    - Netatmo
    - Parrot Flower Power
    - PayPal
    - Pinterest
    - Pocket
    - Reddit
    - RunKeeper
    - Salesforce
    - SoundCloud
    - Spotify
    - Strava
    - Stripe
    - Ustream
    - Vimeo
    - Vkontakte
    - Xing
    - Yahoo
    - Yammer
- more to come!

Examples
--------

[](#examples)

```
    php -S localhost:8000 -t examples
```

Then point your browser to:

```
    http://localhost:8000/

```

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.
- Laravel 4: Dariusz Prząda has written [a service provider](https://github.com/artdarek/oauth-4-laravel) for the library.
- Laravel 5: Valentin Ivaşcu ported Dariusz Prząda's Laravel 4 library to [Laravel 5](https://github.com/oriceon/oauth-5-laravel).
- Symfony: Alexander Pinnecke has written [a Symfony Bundle](https://github.com/apinnecke/OAuthBundle) for the library.

Extensions
----------

[](#extensions)

- Extract normalized user data from OAuth Services with the library [PHPoAuthUserData](https://github.com/Oryzone/PHPoAuthUserData) by Luciano Mammino

Tests
-----

[](#tests)

```
    composer tests
```

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor3

3 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 ~95 days

Recently: every ~289 days

Total

47

Last Release

464d ago

Major Versions

v0.8.11 → v1.0.x-dev2020-06-30

v1.0.x-dev → v2.0.x-dev2021-08-25

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

v0.2.0PHP &gt;=5.3.0

v1.0.x-devPHP ^7.2

v2.0.x-devPHP ^7.2 || 8.0.\*

0.8.14PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8786299c65265ae26a7ded6132169b83642352b772faf17ecf0aa6a25b1b6f15?d=identicon)[carlos-mg89](/maintainers/carlos-mg89)

---

Top Contributors

[![PeeHaa](https://avatars.githubusercontent.com/u/1330296?v=4)](https://github.com/PeeHaa "PeeHaa (174 commits)")[![PedroAmorim](https://avatars.githubusercontent.com/u/6399306?v=4)](https://github.com/PedroAmorim "PedroAmorim (30 commits)")[![elliotchance](https://avatars.githubusercontent.com/u/927418?v=4)](https://github.com/elliotchance "elliotchance (24 commits)")[![hannesvdvreken](https://avatars.githubusercontent.com/u/1410358?v=4)](https://github.com/hannesvdvreken "hannesvdvreken (20 commits)")[![carlos-mg89](https://avatars.githubusercontent.com/u/19690868?v=4)](https://github.com/carlos-mg89 "carlos-mg89 (19 commits)")[![flavioheleno](https://avatars.githubusercontent.com/u/471860?v=4)](https://github.com/flavioheleno "flavioheleno (16 commits)")[![borfast](https://avatars.githubusercontent.com/u/4837?v=4)](https://github.com/borfast "borfast (15 commits)")[![elicwhite](https://avatars.githubusercontent.com/u/249164?v=4)](https://github.com/elicwhite "elicwhite (10 commits)")[![daviddesberg](https://avatars.githubusercontent.com/u/1907815?v=4)](https://github.com/daviddesberg "daviddesberg (9 commits)")[![thomaswelton](https://avatars.githubusercontent.com/u/678372?v=4)](https://github.com/thomaswelton "thomaswelton (8 commits)")[![bencorlett](https://avatars.githubusercontent.com/u/181919?v=4)](https://github.com/bencorlett "bencorlett (7 commits)")[![toin0u](https://avatars.githubusercontent.com/u/672421?v=4)](https://github.com/toin0u "toin0u (7 commits)")[![leansoft](https://avatars.githubusercontent.com/u/2990204?v=4)](https://github.com/leansoft "leansoft (7 commits)")[![igorw](https://avatars.githubusercontent.com/u/88061?v=4)](https://github.com/igorw "igorw (6 commits)")[![tezrik](https://avatars.githubusercontent.com/u/15199672?v=4)](https://github.com/tezrik "tezrik (6 commits)")[![janakaonline](https://avatars.githubusercontent.com/u/1264767?v=4)](https://github.com/janakaonline "janakaonline (6 commits)")[![mouhamed](https://avatars.githubusercontent.com/u/3195102?v=4)](https://github.com/mouhamed "mouhamed (6 commits)")[![ViktorAksionov](https://avatars.githubusercontent.com/u/2520890?v=4)](https://github.com/ViktorAksionov "ViktorAksionov (5 commits)")[![cgenevier](https://avatars.githubusercontent.com/u/1074752?v=4)](https://github.com/cgenevier "cgenevier (5 commits)")[![connyay](https://avatars.githubusercontent.com/u/597300?v=4)](https://github.com/connyay "connyay (5 commits)")

---

Tags

securityAuthenticationoauthauthorization

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/carlos-mg89-oauth/health.svg)](https://phpackages.com/packages/carlos-mg89-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)
