Skip to content

leroy-merlin-br/lmbr-socialite-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leroy Merlin Brazil driver for Laravel Socialite

Latest Version on Packagist

Installation

You can install the package via composer:

composer require leroy-merlin-br/lmbr-socialite-driver

This service provider must be installed. Skip if you are using Laravel 5.5+, this driver comes with auto discovery for providers.

// config/app.php
'providers' => [
    ...
    LeroyMerlin\Socialite\ServiceProvider::class,
];

Configuration and Usage

Just follow the Socialite Documentation using leroy-merlin on your config/services.php and driver. For example:

// config/services.php
'leroy-merlin' => [
    'client_id' => env('LMBR_CLIENT_ID'),         // Your Leroy Merlin Client ID
    'client_secret' => env('LMBR_CLIENT_SECRET'), // Your Leroy Merlin Client Secret
    'redirect' => 'http://your-callback-url',
],
public function redirectToProvider()
{
    return Socialite::driver('leroy-merlin')->redirect();
}

public function handleProviderCallback()
{
    $user = Socialite::driver('leroy-merlin')->user();

    // $user->getName();
    // $user->getEmail();
}