PHPackages                             scharrier/li3\_socialauth - 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. scharrier/li3\_socialauth

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

scharrier/li3\_socialauth
=========================

Lithium social oAuth adapters

25208

Since Dec 17Compare

[ Source](https://github.com/scharrier/li3_socialauth)[ Packagist](https://packagist.org/packages/scharrier/li3_socialauth)[ RSS](/packages/scharrier-li3-socialauth/feed)WikiDiscussions Synced 2w ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

li3\_socialauth
===============

[](#li3_socialauth)

> I'm sorry, this li3 package isn't still maintained. If someone wants to take the lead, just ping me.

Lithium universal oAuth plugin: uses the excellent oAuth library by Lusitanian () to provide Li3 auth adapters.

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

[](#installation)

The easiest way to install li3\_socialauth is to use composer, adding this lines in your composer.json file:

```
{
    "require": {
        "scharrier/li3_socialauth": "dev-master"
    }
}

```

Then update your project:

```
composer update

```

And load the library:

```
// config/bootstrap/libraries.php
Libraries::add('li3_socialauth') ;

// Add the composer autoloader if not already done
require_once(LITHIUM_LIBRARY_PATH . '/autoload.php') ;

```

Using li3\_socialauth
---------------------

[](#using-li3_socialauth)

Each social auth type has its own Lithium auth adapter. Just define your new auth like this:

```
Auth::config(array(
  'twitter' => array(
  	'adapter' => 'Twitter',
      'key' => 'YOUR_KEY',
      'secret' => 'YOUR_SECRET'
  ),
  'facebook' => array(
    'adapter' => 'Facebook',
      'key' => 'YOUR_KEY',
      'secret' => 'YOUR_SECRET',
      'scope' => array('email','read_friendlists','user_online_presence')   // Extend the auth scope
  )
));

```

Then you can use this auth like any other auth mecanism in Lithium. Here is an example of an oauth login method:

```
public function login() {
    // The user choose an external auth : adapter name given as the first param
    if (!empty($this->request->params['args'][0])) {
        // Can we login in ?
		if (Auth::check($this->request->params['args'][0], $this->request)) {
			$this->redirect('/') ;
		}
	}
}

```

And you are done.

Universal Auth class
--------------------

[](#universal-auth-class)

Using this method of authentication, you will quickly have a lot of adapters to check in order to get the authed user. So I have created an universal Auth class witch checks each adapter when calling check() or clear() methods.

Here is an example of usage:

```
// Using li3_socialauth instead of Lithium auth
use li3_socialauth\extensions\security\Auth;

if (Auth::check()) {
    echo 'Logout ?' ;
} else {
    echo 'You should login first' ;
}

```

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

[](#supported-services)

Actually these services are supported. More to come soon:

- Twitter
- Facebook
- Google+
- Microsoft Live
- Github
- Foursquare

Help and support
----------------

[](#help-and-support)

Fork it, play with it, commit and pull ! Email at  if some help needed.

###  Health Score

24

—

LowBetter than 30% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/30788?v=4)[Sébastien Charrier](/maintainers/scharrier)[@scharrier](https://github.com/scharrier)

### Embed Badge

![Health badge](/badges/scharrier-li3-socialauth/health.svg)

```
[![Health](https://phpackages.com/badges/scharrier-li3-socialauth/health.svg)](https://phpackages.com/packages/scharrier-li3-socialauth)
```

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)[firemultimedia/mautic-multi-captcha-bundle

This plugin brings Google's reCAPTCHA, hCaptcha, and Cloudflare Turnstile integration to mautic.

151.4k](/packages/firemultimedia-mautic-multi-captcha-bundle)

PHPackages © 2026

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