PHPackages                             konsulting/laravel-butler - 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. konsulting/laravel-butler

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

konsulting/laravel-butler
=========================

Butler manages multiple Socialite authentication for your Laravel app.

0.11.0(3y ago)4261[1 issues](https://github.com/konsulting/laravel-butler/issues)MITPHPPHP ^7.1||^8.0CI failing

Since Nov 3Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/konsulting/laravel-butler)[ Packagist](https://packagist.org/packages/konsulting/laravel-butler)[ RSS](/packages/konsulting-laravel-butler/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (9)Versions (29)Used By (0)

Butler
======

[](#butler)

*Butler manages multiple [Socialite](https://github.com/laravel/socialite) authentication for your [Laravel](https://laravel.com) app.*

In a few simple steps you can allow users to log in to your site using multiple providers.

Butler is built to work alongside standard Laravel authentication, and uses Socialite to connect to authentication providers.

Requirements
------------

[](#requirements)

- Install [Socialite](https://github.com/laravel/socialite) - follow the [documentation](https://laravel.com/docs/socialite) on the Laravel site.
- Set up your Socialite providers (you may need to install extra [Socialite Providers](https://socialiteproviders.github.io/)).

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

[](#installation)

- Install Butler using composer: `composer require konsulting/laravel-butler`
- If you are using Laravel 5.5, Butler will auto-register the service provider and the Facade. However, if you have chosen not to auto-register, or are using an earlier version, add Butler's Service Provider to `config/app.php`

```
'providers' => [
    // Other service providers...

    Konsulting\Butler\ButlerServiceProvider::class,
],
```

- Add Butler's Facade to `config/app.php`

```
'aliases' => [
    // Other aliases...

    'Butler' => Konsulting\Butler\ButlerFacade::class,
],
```

- Add Butler's routes to `app/Providers/RouteServiceProvider.php`

```
class RouteServiceProvider ...

public function map()
{
    $this->mapApiRoutes();

    $this->mapWebRoutes();

    \Butler::routes();
}
```

- Publish configuration and adjust for your site `php artisan vendor:publish --provider=Konsulting\\Butler\\ButlerServiceProvider --tag=config`

Adjust in `config/butler.php`. Add the providers you want to make available for Authentication - these map directly to Socialite drivers. There are examples in the published file.

```
    // Other Settings

    'providers' => [
        'google' => [
            'name' => 'Google',
            'scopes' => [], // define any specific scopes you want to request here
            'icon' => 'fa fa-google',
            'class' => 'btn-google',
        ],
        ...
    ]
```

See configuration options for more information.

- *Optionally* add list of Oauth buttons to your login page, and status feedback.

    Add the following includes to your blade template for the login page.

```
@include('butler::status')

@include('butler::list')

```

Configuration Options
---------------------

[](#configuration-options)

There is a small set of configuration options.

OptionWhat it’s foruser\_providerIt finds and creates users for Butler. Only creating if it is allowed to.social\_identities\_table\_nameThe table used for storing social identitiesuser\_classThe applications user model, used by the user provider, and the SocialIdentity class to set up the user relation.providersThe list of Social Login providers that Butler needs to be aware of. (These are essentially the Socialite Drivers you are using). It is used to populate the Notification to users and the list view, we also allow a list of scopes to request to be set here.can\_create\_usersSets whether Butler is allowed to create users when a new Social Identity is received and there is no matching user account.confirm\_identity\_for\_new\_userSets whether to ask the user to confirm the identity if it is their first one and they just created the account.confirm\_identity\_notificationThe Notification class to use when telling the user that we had a Social Identification request. Sent when using the AuthController.can\_associate\_to\_logged\_in\_userAllow Butler to associate a new identity to the logged in user, rather than matching on email address.login\_immediately\_after\_confirmShould we log someone in straight after confirming via email, default is false.route\_mapDefines the mapping of Butler's name for special routes in the application to actual application values. We’ve set some common ones out of the box.Butler Driver
-------------

[](#butler-driver)

We wrap the socialite driver in a Butler Driver which adds a methods to `refresh()` a social identity using the refresh token. It will also proxy all the usual SocialiteProvider methods to the orginal provider.

```
	$driver = \Butler::driver(string $providerName); // For a specific social identity, this would be $socialIdentity->provider
	$driver->refresh($socialIdentity);
```

Security
--------

[](#security)

We have not encrypted any of the retrieved tokens at this time, since the tokens are intended to be short-lived. We’re happy to receive views on this decision.

If you find any security issues, or have any concerns, please email [keoghan@klever.co.uk](keoghan@klever.co.uk), rather than using the issue tracker.

Contributing
------------

[](#contributing)

Contributions are welcome and will be fully credited. We will accept contributions by Pull Request.

Please:

- Use the PSR-2 Coding Standard
- Add tests, if you’re not sure how, please ask.
- Document changes in behaviour, including readme.md.

Testing
-------

[](#testing)

We use [PHPUnit](https://phpunit.de) and the excellent [orchestral/testbench](https://github.com/orchestral/testbench)

Run tests using PHPUnit: `vendor/bin/phpunit`

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance46

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 54.3% 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 ~141 days

Recently: every ~403 days

Total

25

Last Release

138d ago

PHP version history (5 changes)0.1.0PHP ^5.6 | ^7.0

0.4.0PHP ^5.6|^7.0

0.8.0PHP ^7.1

0.11.0PHP ^7.1||^8.0

0.12.x-devPHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4703657?v=4)[Konsulting](/maintainers/konsulting)[@konsulting](https://github.com/konsulting)

---

Top Contributors

[![Keoghan](https://avatars.githubusercontent.com/u/6714599?v=4)](https://github.com/Keoghan "Keoghan (44 commits)")[![rdarcy1](https://avatars.githubusercontent.com/u/15962421?v=4)](https://github.com/rdarcy1 "rdarcy1 (35 commits)")[![agrover86](https://avatars.githubusercontent.com/u/32781068?v=4)](https://github.com/agrover86 "agrover86 (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

laravelmulti-authoauth2socialitesocialite-providers

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/konsulting-laravel-butler/health.svg)

```
[![Health](https://phpackages.com/badges/konsulting-laravel-butler/health.svg)](https://phpackages.com/packages/konsulting-laravel-butler)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

27.6k172.1k9](/packages/bagisto-bagisto)[laravel/octane

Supercharge your Laravel application's performance.

4.0k26.6M223](/packages/laravel-octane)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M993](/packages/statamic-cms)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[laravel/nightwatch

The official Laravel Nightwatch package.

36210.1M36](/packages/laravel-nightwatch)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)

PHPackages © 2026

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