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

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

larastarscn/socialite
=====================

laravel socialite extends for chinese

v0.0.2(9y ago)51314[1 issues](https://github.com/larastarscn/socialite/issues)MITPHP

Since Sep 19Pushed 9y ago1 watchersCompare

[ Source](https://github.com/larastarscn/socialite)[ Packagist](https://packagist.org/packages/larastarscn/socialite)[ RSS](/packages/larastarscn-socialite/feed)WikiDiscussions master Synced 3w ago

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

Larastarscn Socialite
=====================

[](#larastarscn-socialite)

[![License](https://camo.githubusercontent.com/f33129f5c1fa8a1c77c8ee7c131a57a544f2200ad165d5d4b1c647a4e998496e/68747470733a2f2f706f7365722e707567782e6f72672f6c6172617374617273636e2f736f6369616c6974652f6c6963656e73652e737667)](https://packagist.org/packages/larastarscn/socialite)[![Dependency Status](https://camo.githubusercontent.com/0db8d65d8931ac8be3de5ea9103659a8fafc4e8ccaf8055bac1803bd4c817dcc/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f6c61726176656c3a736f6369616c6974652f6465762d6d61737465722f62616467653f7374796c653d666c6174)](https://www.versioneye.com/php/laravel:socialite/dev-master)

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

[](#introduction)

This package extends from [Laravel\\Socialite](https://github.com/laravel/socialite/), which 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. To support the Chinese popular applications, we extended Wechat, QQ and Weibo.

Adapters for other platforms are listed at the community driven [Socialite Providers](https://socialiteproviders.github.io/) website.

Installion
----------

[](#installion)

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

```
composer require larastarscn/socialite

```

Configure
---------

[](#configure)

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

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

    Larastarscn\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`, `bitbucket`, `wechat`, `qq` or `weibo`, 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:

```
