PHPackages                             farzak/socialite - 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. farzak/socialite

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

farzak/socialite
================

OAuth 1 &amp; OAuth 2 libraries.

v1.0.3(5y ago)012.3k[1 PRs](https://github.com/farzak/socialite/pulls)MITPHPPHP &gt;=7.0.0

Since Mar 10Pushed 5y agoCompare

[ Source](https://github.com/farzak/socialite)[ Packagist](https://packagist.org/packages/farzak/socialite)[ RSS](/packages/farzak-socialite/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (7)Versions (10)Used By (0)

Socialite
=========

[](#socialite)

[![Build Status](https://camo.githubusercontent.com/f3c181408212da0c4f243e5f6078464850821b5cec44c0b21d512f6a685a57ef/68747470733a2f2f7472617669732d63692e6f72672f736f6369616c6974652d6d616e616765722f736f6369616c6974652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/socialite-manager/socialite)[![MIT License](https://camo.githubusercontent.com/db79b92834d905629b1aea42c9aa493da02060189e2af90840b1be5d6bf6ddf7/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c6174)](LICENSE)

Introduction
------------

[](#introduction)

This is inspired by laravel/socialite, you can easily use it without Laravel.

It possible to use it with various frameworks and middleware.

It is compatible with laravel/socialite.
You can check the [Document](https://laravel.com/docs/5.5/socialite) of laravel.

Core Providers
--------------

[](#core-providers)

- twitter
- github
- google
- facebook
- bitbucket
- linkedin

other Providers
---------------

[](#other-providers)

- [Instagram](https://github.com/socialite-manager/Instagram-Provider)
- [Line](https://github.com/socialite-manager/Line-Provider)
- [VKontakte](https://github.com/socialite-manager/VKontakte-Provider)
- [Weixin](https://github.com/socialite-manager/Weixin-Provider)
- [QQ](https://github.com/socialite-manager/QQ-Provider)
- [Weibo](https://github.com/socialite-manager/Weibo-Provider)
- [Twitch](https://github.com/socialite-manager/Twitch-Provider)
- [Slack](https://github.com/socialite-manager/Slack-Provider)
- [Discord](https://github.com/socialite-manager/Discord-Provider)
- [Dropbox](https://github.com/socialite-manager/Dropbox-Provider)
- [Yahoo](https://github.com/socialite-manager/Yahoo-Provider)
- [Spotify](https://github.com/socialite-manager/Spotify-Provider)
- [GitLab](https://github.com/socialite-manager/GitLab-Provider)
- [Yandex](https://github.com/socialite-manager/Yandex-Provider)
- Add more...

Requirement
-----------

[](#requirement)

```
PHP >= 7.0

```

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

[](#installation)

```
composer require socialite-manager/socialite

```

Basic Usage
-----------

[](#basic-usage)

```
$config = [
    'client_id' => 'xxx',
    'client_secret' => 'xxx',
    'redirect' => 'http://example.com/callback.php',
];
```

`oath.php`

```
use Socialite\Socialite;

Socialite::driver('twitter', $config)->redirect();
```

`callback.php`

```
use Socialite\Socialite;

$user = Socialite::driver('twitter', $config)->user();

$user->getAvatar();
$user->getEmail();
$user->getId();
$user->getNickname();
$user->getName();
```

Advanced Usage
--------------

[](#advanced-usage)

`Sosialite` have options for use with framework and middleware

### Set Request

[](#set-request)

Interface: `\Psr\Http\Message\ServerRequestInterface`

```
Socialite::driver('twitter', $config)
    ->setRequest($this->request);
```

### Set Session

[](#set-session)

need one of the following `read/write` interfaces.

write`$session->put()``$session->set()``$session->write()`read`$session->get()``$session->read()````
Socialite::driver('twitter', $config)
    ->setSession($this->request->getSession());
```

### Redirect psr7 response

[](#redirect-psr7-response)

`Psr\Http\Message\ResponseInterface` will be returned

```
Socialite::driver('twitter', $config)->psr7Redirect()

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 91.2% 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 ~119 days

Recently: every ~206 days

Total

8

Last Release

2153d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6195666?v=4)[Faruh Zakirov](/maintainers/farzak)[@farzak](https://github.com/farzak)

---

Top Contributors

[![mosaxiv](https://avatars.githubusercontent.com/u/28671296?v=4)](https://github.com/mosaxiv "mosaxiv (52 commits)")[![farzak](https://avatars.githubusercontent.com/u/6195666?v=4)](https://github.com/farzak "farzak (4 commits)")[![timdue](https://avatars.githubusercontent.com/u/24282762?v=4)](https://github.com/timdue "timdue (1 commits)")

---

Tags

oauthsocialite

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/farzak-socialite/health.svg)

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

###  Alternatives

[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[overtrue/socialite

A collection of OAuth 2 packages.

1.4k5.5M87](/packages/overtrue-socialite)[socialiteproviders/manager

Easily add new or override built-in providers in Laravel Socialite.

42442.0M544](/packages/socialiteproviders-manager)[socialiteproviders/apple

Apple OAuth2 Provider for Laravel Socialite

618.4M8](/packages/socialiteproviders-apple)[socialiteproviders/microsoft-azure

Microsoft Azure OAuth2 Provider for Laravel Socialite

556.0M19](/packages/socialiteproviders-microsoft-azure)[socialiteproviders/vkontakte

VKontakte OAuth2 Provider for Laravel Socialite

881.0M7](/packages/socialiteproviders-vkontakte)

PHPackages © 2026

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