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

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

telenok/socialite
=================

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

v2.0.17(9y ago)09MITPHPPHP &gt;=5.4.0

Since Aug 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/telenok/socialite)[ Packagist](https://packagist.org/packages/telenok/socialite)[ RSS](/packages/telenok-socialite/feed)WikiDiscussions 2.0 Synced 1mo ago

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

Laravel Socialite
=================

[](#laravel-socialite)

[![Build Status](https://camo.githubusercontent.com/8da81cc128131ae2a9d88d662c916bdf6a4c9165bd4c1ebfa72bf2d035079582/68747470733a2f2f7472617669732d63692e6f72672f6c61726176656c2f736f6369616c6974652e737667)](https://travis-ci.org/laravel/socialite)[![Total Downloads](https://camo.githubusercontent.com/4e7ce67b54944df85c55b44b73a868fdf2746401862628b486ef2da5ff8f69f3/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f736f6369616c6974652f642f746f74616c2e737667)](https://packagist.org/packages/laravel/socialite)[![Latest Stable Version](https://camo.githubusercontent.com/8353cbd4177791ea39f5914640a6c428693af39bb7bcc315e8d0003fc321b5b5/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f736f6369616c6974652f762f737461626c652e737667)](https://packagist.org/packages/laravel/socialite)[![Latest Unstable Version](https://camo.githubusercontent.com/3cc428e0d4d79cb0b2a9d09a85f8b39186425ac243ad54052d23e1dda3d4de84/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f736f6369616c6974652f762f756e737461626c652e737667)](https://packagist.org/packages/laravel/socialite)[![License](https://camo.githubusercontent.com/70dfef8df3269d1f23aceaf240ed35e739020a1fe7ad166d702549305bc0bfc2/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f736f6369616c6974652f6c6963656e73652e737667)](https://packagist.org/packages/laravel/socialite)[![Dependency Status](https://camo.githubusercontent.com/0db8d65d8931ac8be3de5ea9103659a8fafc4e8ccaf8055bac1803bd4c817dcc/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f6c61726176656c3a736f6369616c6974652f6465762d6d61737465722f62616467653f7374796c653d666c6174)](https://www.versioneye.com/php/laravel:socialite/dev-master)

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

[](#introduction)

Laravel Socialite provides an expressive, fluent interface to OAuth authentication with Facebook, Twitter, Google, LinkedIn, GitHub and Bitbucket. It handles almost all of the boilerplate social authentication code you are dreading writing.

**We are not accepting new adapters.**

License
-------

[](#license)

Laravel Socialite is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

Official Documentation
----------------------

[](#official-documentation)

In addition to typical, form based authentication, Laravel also provides a simple, convenient way to authenticate with OAuth providers using [Laravel Socialite](https://github.com/laravel/socialite). Socialite currently supports authentication with Facebook, Twitter, LinkedIn, Google, GitHub and Bitbucket.

To get started with Socialite, add to your `composer.json` file as a dependency:

```
composer require laravel/socialite

```

### Configuration

[](#configuration)

After installing the Socialite library, register the `Laravel\Socialite\SocialiteServiceProvider` in your `config/app.php` configuration file:

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

    Laravel\Socialite\SocialiteServiceProvider::class,
],
```

Also, add the `Socialite` facade to the `aliases` array in your `app` configuration file:

```
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
```

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` or `bitbucket`, depending on the providers your application requires. For example:

```
'github' => [
    'client_id' => 'your-github-app-id',
    'client_secret' => 'your-github-app-secret',
    'redirect' => 'http://your-callback-url',
],
```

### Basic Usage

[](#basic-usage)

Next, you are ready to authenticate users! You will need two routes: one for redirecting the user to the OAuth provider, and another for receiving the callback from the provider after authentication. We will access Socialite using the `Socialite` facade:

```
