gsdw/social

Laravel social connect

v0.1.0 2016-05-11 03:27 UTC

This package is not auto-updated.

Last update: 2024-12-07 20:17:25 UTC


README

Introduction

install

add code to composer.json

"require": {
    "laravel/socialite": "^2.0",
    "gsdw/social": "0.1.*"
}

Configuration

register the Provider in your config/app.php configuration file:

'providers' => [
    // Other service providers...
    Laravel\Socialite\SocialiteServiceProvider::class,
    Gsdw\Social\Providers\SocialServiceProvider::class,
],

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

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

Add information app project in config/services.php configuration file

'google' => [
    'client_id' => 'your-github-app-id',
    'client_secret' => 'your-github-app-secret',
    'redirect' => url('social/handle/google'),
],

Add link Login

Default link to login social is /social/redirect/google. Can use html output link: \Gsdw\Social\Helpers\Output::googleButton()

Notification

Add code in layout to show notification @if (count($errors) > 0) <ul> @foreach ($errors->all() as $error) <li>{{ $error }}</li> @endforeach </ul> @endif

Reference

https://github.com/laravel/socialite