PHPackages                             mckenziearts/laravel-oauth - 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. mckenziearts/laravel-oauth

ActiveLaravel-package[Authentication &amp; Authorization](/categories/authentication)

mckenziearts/laravel-oauth
==========================

Social OAuth authentication for Laravel 5. Drivers: Facebook, Twitter, Google, LinkedIn, Github

1.0.6(7y ago)521695MITPHPCI failing

Since Jun 30Pushed 6y ago2 watchersCompare

[ Source](https://github.com/mckenziearts/laravel-oauth)[ Packagist](https://packagist.org/packages/mckenziearts/laravel-oauth)[ Docs](https://github.com/mckenziearts/laravel-oauth)[ RSS](/packages/mckenziearts-laravel-oauth/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (4)Versions (10)Used By (0)

[![](https://camo.githubusercontent.com/ee7d553ceb8a45a2ef48472817cf876bcaaf4cd806a5232c4537d158ad86fe2c/68747470733a2f2f7069782e77617463682f65496435776e2f3150754c57592e706e67)](https://camo.githubusercontent.com/ee7d553ceb8a45a2ef48472817cf876bcaaf4cd806a5232c4537d158ad86fe2c/68747470733a2f2f7069782e77617463682f65496435776e2f3150754c57592e706e67)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a3ca6e871ab2e7eaa297e08bdb91dff8807b5e49a328009fd933d9491665db0e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d636b656e7a6965617274732f6c61726176656c2d6f617574682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mckenziearts/laravel-oauth)[![Total Downloads](https://camo.githubusercontent.com/2ff0dc72e6694da722e5f9618dd74f386647b4d6a95795a33ea82561454afba0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d636b656e7a6965617274732f6c61726176656c2d6f617574682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mckenziearts/laravel-oauth)[![Build Status](https://camo.githubusercontent.com/4511614832d776656cc782a8a99b07548500a0a8573746d31fd6df0d47859955/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d636b656e7a6965617274732f6c61726176656c2d6f617574682f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Mckenziearts/laravel-oauth/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/860482b59214d2b0c22c5dc4bbdc446668155aa5f3cdaa0950517bfc4f105d17/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d636b656e7a6965617274732f6c61726176656c2d6f617574682f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mckenziearts/laravel-oauth/?branch=master)[![StyleCI](https://camo.githubusercontent.com/334cd8aa87ff4bda03056dda8a998d138a8d77c49949c605fc013c19b480be3e/68747470733a2f2f7374796c6563692e696f2f7265706f732f3133393230333534392f736869656c64)](https://styleci.io/repos/139203549)

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

[](#introduction)

Social OAuth authentication for Laravel 5 which provides oAuth support in PHP 5.3+ and is very easy to integrate with any project which requires an oAuth client. This package use [Laravel Socialite](https://github.com/laravel/socialite). For Laravel 4 look this [package](https://github.com/artdarek/oauth-4-laravel)

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

[](#supported-services)

The library supports OAuth 2.0 compliant services. A list of currently implemented services can be found below. More services will be implemented soon.

Included service implementations:

- OAuth2
    - Facebook
    - GitHub
    - Google
    - Instagram
    - LinkedIn
    - Bitbucket
    - Twitter
    - Dribbble
    - Pinterest
    - Youtube
    - Gitlab
- more to come!

Laravel Support version

**Laravel****laravel-oauth**&lt;=5.5^1.06.0^1.1Installation
------------

[](#installation)

1. Include the package in your project using Composer

```
$ composer require mckenziearts/laravel-oauth
```

2. Add the service provider to your `config/app.php` providers array:

    **For Laravel 5.5.+ - you're done.**

```
Mckenziearts\LaravelOAuth\LaravelOAuthServiceProvider::class,
```

3. Publish the Vendor Assets files by running:

```
php artisan vendor:publish --provider="Mckenziearts\LaravelOAuth\LaravelOAuthServiceProvider"
```

4. Now that we have published a few new files to our application we need to reload them with the following command:

```
composer dump-autoload
```

Configuration
-------------

[](#configuration)

When you published the vendor assets you added a new file inside of your `config` folder which is called `config/laravel-oauth.php`. This file contains a bunch of configuration you can use to configure your connexion using social networks.

First, you have to add your service like is defined on The official documentation of Socialite [available here](https://laravel.com/docs/5.6/socialite#configuration). Just setup your Oauth services for your application. Laravel/socialite is automatically installed by this package.

Usage
-----

[](#usage)

1. Fisrt of all in the `config/laravel-oauth.php` file you must define the default users table name to simplify migrations. By default users table is used

```
'users' => [
    'table'   => 'users',
],
```

2. Secondly you must specify the providers to use for social login in the `providers` array. To active a provider set the value to `true`

```
  'providers' => [
    'facebook'  => true,
    'google'    => true,
    'github'    => true,
  ],
```

The last configuration is to stylize the button by editing class name and add or remove icon

[![](https://camo.githubusercontent.com/34187fa1022ab4d73c918f90ff79c70088254ecc96a63582e471db651c51c6ec/68747470733a2f2f7069782e77617463682f6d33714d69772f5138664b49692e706e67)](https://camo.githubusercontent.com/34187fa1022ab4d73c918f90ff79c70088254ecc96a63582e471db651c51c6ec/68747470733a2f2f7069782e77617463682f6d33714d69772f5138664b49692e706e67)

Next, if you may want to re-publish the laravel-oauth assets, config, and the migrations run the following command:

```
php artisan vendor:publish --tag=laravel-oauth.assets --force
php artisan vendor:publish --tag=laravel-oauth.config --force
php artisan vendor:publish --tag=laravel-oauth.migrations --force

```

3. Next to make sure you have the latest database schema run:

```
php artisan migrate

```

4. Inside of your master.blade.php file include a header yield. Inside the head of your master or app.blade.php add the following:

```
@yield('css')

```

5. Add the blade directive to your view where you want to display the socials buttons. The directive takes a parameter `login` to display the login text or `resgister` for the text related to the registration

```
@socialite('login')

```

6. Add the style of the buttons by adding this to your view in the section in the `@yield('css')` who defined in your master layout

```
@section('css')

@endsection

```

7. In the `Auth\LoginController` of your application, add the `OAuthSocialite` trait:

```
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Mckenziearts\LaravelOAuth\Traits\OAuthSocialite;

class LoginController extends Controller
{
    use OAuthSocialite;
    ..
```

With this feature you can overwrite the present methods on the trait if you want to customize them even more

8. Add this routes to your default web route file

```
Route::get('/auth/{provider}', 'Auth\LoginController@redirectToProvider');
Route::get('/callback/{provider}', 'Auth\LoginController@handleProviderCallback');
```

Change log
----------

[](#change-log)

Please see the [changelog.md](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Arthur Monney](https://www.twitter.com/monneyarthur)
- [Laravel Socialite](https://laravel.com/docs/5.6/socialite)

License
-------

[](#license)

MIT. Please see the [license.md](license.md) for more information.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 93.1% 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 ~3 days

Total

7

Last Release

2854d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14105989?v=4)[Arthur Monney](/maintainers/Mckenziearts)[@mckenziearts](https://github.com/mckenziearts)

---

Top Contributors

[![mckenziearts](https://avatars.githubusercontent.com/u/14105989?v=4)](https://github.com/mckenziearts "mckenziearts (54 commits)")[![qognitivdevs](https://avatars.githubusercontent.com/u/57529026?v=4)](https://github.com/qognitivdevs "qognitivdevs (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravellaravel-socialiteoauthoauth2-authenticationphpsocial-loginsocial-oauth-authenticationsocialitelaraveloauthlaravel socialite

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mckenziearts-laravel-oauth/health.svg)

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

###  Alternatives

[socialiteproviders/manager

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

42442.0M544](/packages/socialiteproviders-manager)[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)[schedula/laravel-passport-socialite

The missing laravel passport feature for social authentication

4922.6k](/packages/schedula-laravel-passport-socialite)[kovah/laravel-socialite-oidc

OpenID Connect OAuth2 Provider for Laravel Socialite

2073.7k](/packages/kovah-laravel-socialite-oidc)[laravel-uis/socialite-ui

A Laravel Socialite UI for the new Laravel Starter Kits

114.3k1](/packages/laravel-uis-socialite-ui)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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