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

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

creatvstudio/socialite-auth
===========================

Provides easy to configure socialite authentication

v2.0.1(5y ago)015MITPHPPHP ^7.1

Since Mar 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/CreatvStudio/socialite-auth)[ Packagist](https://packagist.org/packages/creatvstudio/socialite-auth)[ Docs](https://github.com/creatvstudio/socialite-auth)[ RSS](/packages/creatvstudio-socialite-auth/feed)WikiDiscussions master Synced 1mo ago

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

Socialite Auth
==============

[](#socialite-auth)

[![Latest Version on Packagist](https://camo.githubusercontent.com/89ee180bc89f609d60b233c074e7384a9d9d6e2cce2213c5e1e922ce1c2b4ef6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63726561747673747564696f2f736f6369616c6974652d617574682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creatvstudio/socialite-auth)[![Total Downloads](https://camo.githubusercontent.com/cdbce285a1cb41d606759f1fba32efd8a849f0307e1ec935bf052204bf1ef27b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63726561747673747564696f2f736f6369616c6974652d617574682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creatvstudio/socialite-auth)

This package provides easy laravel socialite authentication. By [CreatvStudio](https://creatvstudio.ph)

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

[](#requirements)

To get started use composer to install [Laravel Socialite](https://laravel.com/docs/socialite). See Laravel Socialite official [documentation](https://laravel.com/docs/socialite).

```
composer require laravel/socialite
```

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

[](#installation)

You can install the package via composer:

```
composer require creatvstudio/socialite-auth
```

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

[](#configuration)

Before using Socialite, you will also need to add credentials for the OAuth services your application utilizes. These credentials should be placed in your `config/services.php` configuration file, and should use the key `facebook`, `twitter`, `linkedin`, `google`, `github`, `gitlab` or `bitbucket`, depending on the providers your application requires. For example:

```
'facebook' => [
    'client_id' => env('FACEBOOK_CLIENT_ID'),
    'client_secret' => env('FACEBOOK_CLIENT_SECRET'),
    'redirect' => env('APP_URL') . '/login/facebook/callback',
],

'github' => [
    'client_id' => env('GITHUB_CLIENT_ID'),
    'client_secret' => env('GITHUB_CLIENT_SECRET'),
    'redirect' => env('APP_URL') . '/login/github/callback',
],
```

User Model
----------

[](#user-model)

Use the `HasSocialite` trait in your `User` model.

```
use CreatvStudio\SocialiteAuth\HasSocialite;

class User extends Authenticatable
{
    use Notifiable, HasRolesAndAbilities, HasSocialite;

    ...
}
```

Controller
----------

[](#controller)

Create a new controller to handle your requests

```
php artisan make:controller Auth/SocialiteController
```

Then use the `AuthenticatesSocialiteUser` trait. *(In the future we plan to create a stub)*

```
