PHPackages                             socialiteproviders/manager - 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. socialiteproviders/manager

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

socialiteproviders/manager
==========================

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

4.9.2(2mo ago)42542.0M—1.6%87[1 PRs](https://github.com/SocialiteProviders/Manager/pulls)20MITPHPPHP ^8.2CI failing

Since Feb 19Pushed 1mo ago9 watchersCompare

[ Source](https://github.com/SocialiteProviders/Manager)[ Packagist](https://packagist.org/packages/socialiteproviders/manager)[ Docs](https://socialiteproviders.com)[ RSS](/packages/socialiteproviders-manager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (81)Used By (20)

Socialite Providers Manager
===========================

[](#socialite-providers-manager)

[![Build Status](https://camo.githubusercontent.com/bea30df6ea43693c5a77261bbff06044b669d5ff17421002dfeca90c4f22cc79/68747470733a2f2f7472617669732d63692e6f72672f536f6369616c69746550726f7669646572732f4d616e616765722e737667)](https://travis-ci.org/SocialiteProviders/Manager)[![codecov](https://camo.githubusercontent.com/63f57da01e8fad1b7947e543563db95e269d8889a8c338f6a7389b64d4aef8d6/68747470733a2f2f636f6465636f762e696f2f67682f536f6369616c69746550726f7669646572732f4d616e616765722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/SocialiteProviders/Manager)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5ec1892dac72225aa85c70d55a7bfea7ca5a34256ac767fc4beebfeaefb8f6c0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f536f6369616c69746550726f7669646572732f4d616e616765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/SocialiteProviders/Manager/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/ed1f97c955b58ce7913217102bcdd82791ea3c28cc7fdca448c69eb8ed6db165/68747470733a2f2f706f7365722e707567782e6f72672f736f6369616c69746570726f7669646572732f6d616e616765722f762f737461626c652e737667)](https://packagist.org/packages/socialiteproviders/manager)[![Total Downloads](https://camo.githubusercontent.com/8234e7570a9dfe78203a7e74ef7dd2833f69edc0e18fa96dc36f7bc96198633e/68747470733a2f2f706f7365722e707567782e6f72672f736f6369616c69746570726f7669646572732f6d616e616765722f646f776e6c6f6164732e737667)](https://packagist.org/packages/socialiteproviders/manager)[![Latest Unstable Version](https://camo.githubusercontent.com/9f5a79bc03d3209e0dfbc98a2097f6f076dce116119d1702e51d1604b97568f5/68747470733a2f2f706f7365722e707567782e6f72672f736f6369616c69746570726f7669646572732f6d616e616765722f762f756e737461626c652e737667)](https://packagist.org/packages/socialiteproviders/manager)[![License](https://camo.githubusercontent.com/ea6f9ac045da4e067c4daa11bc6558441c7347b9d2d14485ee80d4caf9466b9e/68747470733a2f2f706f7365722e707567782e6f72672f736f6369616c69746570726f7669646572732f6d616e616765722f6c6963656e73652e737667)](https://packagist.org/packages/socialiteproviders/manager)[![StyleCI](https://camo.githubusercontent.com/2f52dccb7ed9951cd7fc72ceefcaa52dca4681d32fa55e97741bd6db984ee39d/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f33303939333530342f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/30993504?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/e7feb8129aa87daecd1fd1d89ff377ed1a20de1299ffa4e323fa6ebc3d517131/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f64646232663064662d366438352d343331632d386536382d3631363462303864643835322f736d616c6c2e706e67)](https://insight.sensiolabs.com/projects/ddb2f0df-6d85-431c-8e68-6164b08dd852)

About
-----

[](#about)

A package for Laravel Socialite that allows you to easily add new providers or override current providers.

### Benefits

[](#benefits)

- You will have access to all of the providers that you load in using the manager.
- Instantiation is deferred until Socialite is called
- You can override current providers
- You can create new providers
- Lumen usage is easy
- `stateless()` can be set to `true` or `false`
- You can override a config dynamically
- It retrieves environment variables directly from the `.env` file instead of also having to configure the services array.

Available Providers
-------------------

[](#available-providers)

- See the [SocialiteProviders](https://socialiteproviders.com/) list
- You can also make your own or modify someone else's

Reference
---------

[](#reference)

- [Laravel docs about events](https://laravel.com/docs/7.x/events)
- [Laracasts video on events in Laravel 5](https://laracasts.com/lessons/laravel-5-events)
- [Laravel Socialite Docs](https://github.com/laravel/socialite)
- [Laracasts Socialite video](https://laracasts.com/series/whats-new-in-laravel-5/episodes/9)

Creating a Handler
------------------

[](#creating-a-handler)

Below is an example handler. You need to add this full class name to the `listen[]` in the `EventServiceProvider`.

- [See also the Laravel docs about events](https://laravel.com/docs/7.x/events).
- `providername` is the name of the provider such as `meetup`.
- You will need to change your the namespacing and class names of course.

```
namespace Your\Name\Space;

use SocialiteProviders\Manager\SocialiteWasCalled;

class ProviderNameExtendSocialite
{
    public function handle(SocialiteWasCalled $socialiteWasCalled)
    {
        $socialiteWasCalled->extendSocialite('providername', \Your\Name\Space\Provider::class);
    }
}
```

Creating a Provider
-------------------

[](#creating-a-provider)

- Look at the already created [providers](https://socialiteproviders.netlify.app/) for inspiration.
- [See this article on Medium](https://medium.com/@morrislaptop/adding-auth-providers-to-laravel-socialite-ca0335929e42)

Overriding a Built-in Provider
------------------------------

[](#overriding-a-built-in-provider)

You can easily override a built-in `laravel/socialite` provider by creating a new one with exactly the same name (i.e. 'facebook').

Dynamically Passing a Config
----------------------------

[](#dynamically-passing-a-config)

You can dynamically pass a config by using:

```
$clientId = "secret";
$clientSecret = "secret";
$redirectUrl = "http://yourdomain.com/api/redirect";
$additionalProviderConfig = ['site' => 'meta.stackoverflow.com'];
$config = new \SocialiteProviders\Manager\Config($clientId, $clientSecret, $redirectUrl, $additionalProviderConfig);
return Socialite::with('provider-name')->setConfig($config)->redirect();
```

**You must call this before you run any Socialite methods.**

Creating an OAuth1 Server Class
-------------------------------

[](#creating-an-oauth1-server-class)

Take a look at the other [OAuth1 providers](https://socialiteproviders.netlify.app/) for inspiration.

Getting the Access Token Response Body
--------------------------------------

[](#getting-the-access-token-response-body)

Laravel Socialite by default only allows access to the `access_token`. Which can be accessed via the `\Laravel\Socialite\User->token` public property. Sometimes you need access to the whole response body which may contain items such as a `refresh_token`.

To make this possible, the OAuth2 provider class needs to extend `\SocialiteProviders\Manager\OAuth2\AbstractProvider` and OAuth1 providers need to utilize the `\SocialiteProviders\Manager\OAuth1\AbstractProvider` and `\SocialiteProviders\Manager\OAuth1\Server`.

You can access it from the user object like so: `$user->accessTokenResponseBody`

###  Health Score

79

—

ExcellentBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity72

Solid adoption and visibility

Community54

Growing community involvement

Maturity91

Battle-tested with a long release history

 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 ~54 days

Recently: every ~110 days

Total

76

Last Release

61d ago

Major Versions

0.1.10 → 1.0.02015-06-18

1.2.4 → v2.0.02016-03-29

v2.2.1 → v3.0.02017-01-25

v2.3 → v3.52020-03-08

v3.6 → v4.0.02020-10-20

PHP version history (9 changes)0.1PHP &gt;=5.4.0

1.0.0PHP &gt;=5.5.0

v2.0.0PHP ^5.6 || ^7.0

v3.6PHP ^7.2

4.0.1PHP ^7.2 || ^8.0

v4.2.0PHP ^7.4 || ^8.0

v4.4.0PHP ^8.0

v4.8.0PHP ^8.1

4.9.1PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23558090?v=4)[Miguel Piedrafita](/maintainers/m1guelpf)[@m1guelpf](https://github.com/m1guelpf)

![](https://www.gravatar.com/avatar/65eb3a7ba2a2c13b3a9de48b836caf759ad4052f9a839e30464c80d177d5b3d2?d=identicon)[atymic](/maintainers/atymic)

---

Top Contributors

[![AndyWendt](https://avatars.githubusercontent.com/u/6130713?v=4)](https://github.com/AndyWendt "AndyWendt (95 commits)")[![faustbrian](https://avatars.githubusercontent.com/u/22145591?v=4)](https://github.com/faustbrian "faustbrian (31 commits)")[![lucasmichot](https://avatars.githubusercontent.com/u/513603?v=4)](https://github.com/lucasmichot "lucasmichot (16 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (11 commits)")[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (5 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (3 commits)")[![seanmangar](https://avatars.githubusercontent.com/u/6080053?v=4)](https://github.com/seanmangar "seanmangar (2 commits)")[![shaunthegeek](https://avatars.githubusercontent.com/u/4971414?v=4)](https://github.com/shaunthegeek "shaunthegeek (2 commits)")[![ethanransdellrarebird](https://avatars.githubusercontent.com/u/48797338?v=4)](https://github.com/ethanransdellrarebird "ethanransdellrarebird (2 commits)")[![AmrSoliman](https://avatars.githubusercontent.com/u/3324468?v=4)](https://github.com/AmrSoliman "AmrSoliman (2 commits)")[![pilot911](https://avatars.githubusercontent.com/u/4451709?v=4)](https://github.com/pilot911 "pilot911 (2 commits)")[![draperstudio](https://avatars.githubusercontent.com/u/257012927?v=4)](https://github.com/draperstudio "draperstudio (2 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (2 commits)")[![sander3](https://avatars.githubusercontent.com/u/15908302?v=4)](https://github.com/sander3 "sander3 (2 commits)")[![ronnievisser](https://avatars.githubusercontent.com/u/1931199?v=4)](https://github.com/ronnievisser "ronnievisser (1 commits)")[![r-takky](https://avatars.githubusercontent.com/u/32858385?v=4)](https://github.com/r-takky "r-takky (1 commits)")[![slava-vishnyakov](https://avatars.githubusercontent.com/u/817931?v=4)](https://github.com/slava-vishnyakov "slava-vishnyakov (1 commits)")[![alperyazgan](https://avatars.githubusercontent.com/u/5314816?v=4)](https://github.com/alperyazgan "alperyazgan (1 commits)")[![x-yuri](https://avatars.githubusercontent.com/u/730588?v=4)](https://github.com/x-yuri "x-yuri (1 commits)")[![g-plane](https://avatars.githubusercontent.com/u/17216317?v=4)](https://github.com/g-plane "g-plane (1 commits)")

---

Tags

hacktoberfestlaravellaraveloauthmanagerproviderssocialite

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/socialiteproviders-manager/health.svg)

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

###  Alternatives

[andrewdwallo/filament-companies

A comprehensive Laravel authentication and authorization system designed for Filament, focusing on multi-tenant company management.

34450.0k2](/packages/andrewdwallo-filament-companies)[kovah/laravel-socialite-oidc

OpenID Connect OAuth2 Provider for Laravel Socialite

2073.7k](/packages/kovah-laravel-socialite-oidc)[martinbean/socialite-discord-provider

A Discord provider for Laravel Socialite.

2839.2k](/packages/martinbean-socialite-discord-provider)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)[mmanos/laravel-social

A social login package for Laravel 4.

556.8k](/packages/mmanos-laravel-social)[seoda/socialite-apple

Apple OAuth2 Provider for Laravel Socialite

1128.1k](/packages/seoda-socialite-apple)

PHPackages © 2026

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