cesarga/socialite-clio

Clio OAuth2 Provider for Laravel Socialite

v1.0.0 2018-06-19 10:02 UTC

This package is not auto-updated.

Last update: 2024-05-02 14:57:02 UTC


README

Clio OAuth2 Provider for Laravel Socialite.

install

composer require cesarga/socialite-clio

register

app/Providers/EventServiceProvider.php

/**
 * The event listener mappings for the application.
 *
 * @var array
*/
protected $listen = [

    // ...

    'SocialiteProviders\\Manager\\SocialiteWasCalled' => [
        'SocialiteProviders\\Clio\\ClioExtendSocialite@handle',
    ],

    // ...

];

configure

config/services.php

return [

    // ...

    'clio' => [
        'base_url' => env('CLIO_BASE_URL', 'https://app.clio.com'),
        'client_id' => env('CLIO_APP_KEY'),
        'client_secret' => env('CLIO_APP_SECRET'),
        'redirect' => env('CLIO_APP_REDIRECT'),
    ],

    // ...

];

.env

CLIO_BASE_URL=https://eu.app.clio.com
CLIO_APP_KEY=C8dEOljM3EHMK6h4Em8DkmZuzovW6R4JcW06RcMH
CLIO_APP_SECRET=R1bOno3oEt9qUoCYm7vlIKylfJ1nD1OJY0Jc3WVT
CLIO_APP_REDIRECT=http://laravel.local/oauth/clio/callback

start building

return Socialite::driver('clio')->redirect();