PHPackages                             lcobucci/social - 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. lcobucci/social

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

lcobucci/social
===============

Social authentication library for PHP 5.3+

1.0.0-alpha3(12y ago)15249BSD-3-ClausePHPPHP &gt;=5.3

Since Aug 31Pushed 9y ago1 watchersCompare

[ Source](https://github.com/lcobucci/social)[ Packagist](https://packagist.org/packages/lcobucci/social)[ RSS](/packages/lcobucci-social/feed)WikiDiscussions develop Synced 4w ago

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

social
======

[](#social)

Social authentication library for PHP 5.3+

**THIS PROJECT IS NO LONGER MAINTAINED**

Instalation
-----------

[](#instalation)

Social should be installed using [composer](https://packagist.org/packages/lcobucci/social).

Basic usage
-----------

[](#basic-usage)

1. Create a AuthClient and register the providers:

```
// client_config.php
require_once __DIR__ . '/vendor/autoload.php'; //requires the autoloader

use Lcobucci\Social\Providers\Github;
use Lcobucci\Social\AuthClient;
use Lcobucci\Social\Providers\Facebook;

$client = new AuthClient();

$client->appendProvider(
    'github', // The provider identifier (anything you may want)
    Github::create(
        'blablabla', // The client ID
        'blablabla', // The client secret
        'http://blablabla.com/oauth/github/callback.php'// The callback URI  (if you want...)
        ['user:email'] // The default scopes (if you want...)
    )
);

return $client
```

2. Redirect to provider

```
// init.php
$client = require __DIR__ . '/client_config.php'; // Get your configuration
$uri = $client->getAuthorizationUri(
    'github', // The provider identifier you want to use (that you configured before)
    [], // Additional scopes (if you want...)
    uniqid() // State to be validated (if you want...)
);

header('Location: ' . $uri);
```

3. Get authenticated user information

```
// callback.php
use Symfony\Component\HttpFoundation\Request;

$client = require __DIR__ . '/client_config.php'; // Get your configuration
$request = Request::createFromGlobals();

$user = $client->getAuthenticatedUser('github', $request->query);

var_dump($user->getToken()); // Get the access token that should be used on API requests
var_dump($user->getId()); // Get the user ID
var_dump($user->getUsername()); // Get the user login
var_dump($user->getName()); // Get the user name
var_dump($user->getEmail()); // Get the user email
var_dump($user->getAvatar()); // Get the user avatar
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

4684d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/201963?v=4)[Luís Cobucci](/maintainers/lcobucci)[@lcobucci](https://github.com/lcobucci)

---

Top Contributors

[![lcobucci](https://avatars.githubusercontent.com/u/201963?v=4)](https://github.com/lcobucci "lcobucci (13 commits)")

---

Tags

facebookgoogleAuthenticationoauthgithublinkedinlive

### Embed Badge

![Health badge](/badges/lcobucci-social/health.svg)

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

###  Alternatives

[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k22.3M81](/packages/hwi-oauth-bundle)[and/oauth

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

4345.2k2](/packages/and-oauth)[fof/oauth

Allow users to log in with GitHub, Facebook, Google, Discord, GitLab, LinkedIn, and more!

50131.1k45](/packages/fof-oauth)[lorenzoferrarajr/lfj-opauth

LfjOpauth is a Zend Framework 2 module that enables support for many authentication providers through the Opauth framework.

2915.4k](/packages/lorenzoferrarajr-lfj-opauth)

PHPackages © 2026

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