├── .gitignore
├── README.md
├── composer.json
└── src
├── Artdarek
└── OAuth
│ ├── Facade
│ └── OAuth.php
│ ├── OAuth.php
│ ├── OAuthLaravelSession.php
│ └── OAuthServiceProvider.php
└── config
├── .gitkeep
└── config.php
/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor
2 | composer.phar
3 | composer.lock
4 | .DS_Store
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OAuth wrapper for Laravel 5
2 |
3 | oauth-5-laravel is a simple laravel 5 service provider (wrapper) for [Lusitanian/PHPoAuthLib](https://github.com/Lusitanian/PHPoAuthLib)
4 | which provides oAuth support in PHP 5.4+ and is very easy to integrate with any project which requires an oAuth client.
5 |
6 | Was first developed by [Artdarek](https://github.com/artdarek/oauth-4-laravel) for Laravel 4 and I ported it to Laravel 5.
7 |
8 | ---
9 |
10 | - [Supported services](#supported-services)
11 | - [Installation](#installation)
12 | - [Registering the Package](#registering-the-package)
13 | - [Configuration](#configuration)
14 | - [Usage](#usage)
15 | - [Basic usage](#basic-usage)
16 | - [More usage examples](#more-usage-examples)
17 |
18 | ## Supported services
19 |
20 | The library supports both oAuth 1.x and oAuth 2.0 compliant services. A list of currently implemented services can be found below. More services will be implemented soon.
21 |
22 | Included service implementations:
23 |
24 | - OAuth1
25 | - BitBucket
26 | - Etsy
27 | - FitBit
28 | - Flickr
29 | - Scoop.it!
30 | - Tumblr
31 | - Twitter
32 | - Xing
33 | - Yahoo
34 | - OAuth2
35 | - Amazon
36 | - BitLy
37 | - Box
38 | - Dailymotion
39 | - Dropbox
40 | - Facebook
41 | - Foursquare
42 | - GitHub
43 | - Google
44 | - Harvest
45 | - Heroku
46 | - Instagram
47 | - LinkedIn
48 | - Mailchimp
49 | - Microsoft
50 | - PayPal
51 | - Pocket
52 | - Reddit
53 | - RunKeeper
54 | - SoundCloud
55 | - Vkontakte
56 | - Yammer
57 | - more to come!
58 |
59 | To learn more about Lusitanian/PHPoAuthLib go [here](https://github.com/Lusitanian/PHPoAuthLib)
60 |
61 | ## Installation
62 |
63 | Add oauth-5-laravel to your composer.json file:
64 |
65 | ```
66 | "require": {
67 | "oriceon/oauth-5-laravel": "dev-master"
68 | }
69 | ```
70 |
71 | Use composer to install this package.
72 |
73 | ```
74 | $ composer update
75 | ```
76 |
77 | ### Registering the Package
78 |
79 | Register the service provider within the ```providers``` array found in ```config/app.php```:
80 |
81 | ```php
82 | 'providers' => [
83 | // ...
84 |
85 | Artdarek\OAuth\OAuthServiceProvider::class,
86 | ]
87 | ```
88 |
89 | Add an alias within the ```aliases``` array found in ```config/app.php```:
90 |
91 |
92 | ```php
93 | 'aliases' => [
94 | // ...
95 |
96 | 'OAuth' => Artdarek\OAuth\Facade\OAuth::class,
97 | ]
98 | ```
99 |
100 | ## Configuration
101 |
102 | There are two ways to configure oauth-5-laravel.
103 | You can choose the most convenient way for you.
104 | You can use package config file which can be
105 | generated through command line by artisan (option 1) or
106 | you can simply create a config file called ``oauth-5-laravel.php`` in
107 | your ``config`` directory (option 2).
108 |
109 | #### Option 1
110 |
111 | Create configuration file for package using artisan command
112 |
113 | ```
114 | $ php artisan vendor:publish --provider="Artdarek\OAuth\OAuthServiceProvider"
115 | ```
116 |
117 | #### Option 2
118 |
119 | Create configuration file manually in config directory ``config/oauth-5-laravel.php`` and put there code from below.
120 |
121 | ```php
122 | new Session(),
138 |
139 | /**
140 | * Consumers
141 | */
142 | 'consumers' => [
143 |
144 | /**
145 | * Facebook
146 | */
147 | 'Facebook' => [
148 | 'client_id' => '',
149 | 'client_secret' => '',
150 | 'scope' => [],
151 | ],
152 |
153 | ]
154 |
155 | ];
156 | ```
157 |
158 | ### Credentials
159 |
160 | Add your credentials to ``config/oauth-5-laravel.php`` (depending on which option of configuration you choose)
161 |
162 |
163 | The `Storage` attribute is optional and defaults to `Session`.
164 | Other [options](https://github.com/Lusitanian/PHPoAuthLib/tree/master/src/OAuth/Common/Storage).
165 |
166 | ## Usage
167 |
168 | ### Basic usage
169 |
170 | Just follow the steps below and you will be able to get a [service class object](https://github.com/Lusitanian/PHPoAuthLib/tree/master/src/OAuth/OAuth2/Service) with this one rule:
171 |
172 | ```php
173 | $fb = \OAuth::consumer('Facebook');
174 | ```
175 |
176 | Optionally, add a second parameter with the URL which the service needs to redirect to, otherwise it will redirect to the current URL.
177 |
178 | ```php
179 | $fb = \OAuth::consumer('Facebook', 'http://url.to.redirect.to');
180 | ```
181 |
182 | ## Usage examples
183 |
184 | ###Facebook:
185 |
186 | Configuration:
187 | Add your Facebook credentials to ``config/oauth-5-laravel.php``
188 |
189 | ```php
190 | 'Facebook' => [
191 | 'client_id' => 'Your Facebook client ID',
192 | 'client_secret' => 'Your Facebook Client Secret',
193 | 'scope' => ['email','read_friendlists','user_online_presence'],
194 | ],
195 | ```
196 | In your Controller use the following code:
197 |
198 | ```php
199 |
200 | public function loginWithFacebook(Request $request)
201 | {
202 | // get data from request
203 | $code = $request->get('code');
204 |
205 | // get fb service
206 | $fb = \OAuth::consumer('Facebook');
207 |
208 | // check if code is valid
209 |
210 | // if code is provided get user data and sign in
211 | if ( ! is_null($code))
212 | {
213 | // This was a callback request from facebook, get the token
214 | $token = $fb->requestAccessToken($code);
215 |
216 | // Send a request with it
217 | $result = json_decode($fb->request('/me'), true);
218 |
219 | $message = 'Your unique facebook user id is: ' . $result['id'] . ' and your name is ' . $result['name'];
220 | echo $message. "
";
221 |
222 | //Var_dump
223 | //display whole array.
224 | dd($result);
225 | }
226 | // if not ask for permission first
227 | else
228 | {
229 | // get fb authorization
230 | $url = $fb->getAuthorizationUri();
231 |
232 | // return to facebook login url
233 | return redirect((string)$url);
234 | }
235 | }
236 | ```
237 | ###Google:
238 |
239 | Configuration:
240 | Add your Google credentials to ``config/oauth-5-laravel.php``
241 |
242 | ```php
243 | 'Google' => [
244 | 'client_id' => 'Your Google client ID',
245 | 'client_secret' => 'Your Google Client Secret',
246 | 'scope' => ['userinfo_email', 'userinfo_profile'],
247 | ],
248 | ```
249 | In your Controller use the following code:
250 |
251 | ```php
252 |
253 | public function loginWithGoogle(Request $request)
254 | {
255 | // get data from request
256 | $code = $request->get('code');
257 |
258 | // get google service
259 | $googleService = \OAuth::consumer('Google');
260 |
261 | // check if code is valid
262 |
263 | // if code is provided get user data and sign in
264 | if ( ! is_null($code))
265 | {
266 | // This was a callback request from google, get the token
267 | $token = $googleService->requestAccessToken($code);
268 |
269 | // Send a request with it
270 | $result = json_decode($googleService->request('https://www.googleapis.com/oauth2/v1/userinfo'), true);
271 |
272 | $message = 'Your unique Google user id is: ' . $result['id'] . ' and your name is ' . $result['name'];
273 | echo $message. "
";
274 |
275 | //Var_dump
276 | //display whole array.
277 | dd($result);
278 | }
279 | // if not ask for permission first
280 | else
281 | {
282 | // get googleService authorization
283 | $url = $googleService->getAuthorizationUri();
284 |
285 | // return to google login url
286 | return redirect((string)$url);
287 | }
288 | }
289 | ```
290 |
291 |
292 | ###Twitter:
293 |
294 | Configuration:
295 | Add your Twitter credentials to ``config/oauth-5-laravel.php``
296 |
297 | ```php
298 | 'Twitter' => [
299 | 'client_id' => 'Your Twitter client ID',
300 | 'client_secret' => 'Your Twitter Client Secret',
301 | // No scope - oauth1 doesn't need scope
302 | ],
303 | ```
304 | In your Controller use the following code:
305 |
306 | ```php
307 |
308 | public function loginWithTwitter(Request $request)
309 | {
310 | // get data from request
311 | $token = $request->get('oauth_token');
312 | $verify = $request->get('oauth_verifier');
313 |
314 | // get twitter service
315 | $tw = \OAuth::consumer('Twitter');
316 |
317 | // check if code is valid
318 |
319 | // if code is provided get user data and sign in
320 | if ( ! is_null($token) && ! is_null($verify))
321 | {
322 | // This was a callback request from twitter, get the token
323 | $token = $tw->requestAccessToken($token, $verify);
324 |
325 | // Send a request with it
326 | $result = json_decode($tw->request('account/verify_credentials.json'), true);
327 |
328 | $message = 'Your unique Twitter user id is: ' . $result['id'] . ' and your name is ' . $result['name'];
329 | echo $message. "
";
330 |
331 | //Var_dump
332 | //display whole array.
333 | dd($result);
334 | }
335 | // if not ask for permission first
336 | else
337 | {
338 | // get request token
339 | $reqToken = $tw->requestRequestToken();
340 |
341 | // get Authorization Uri sending the request token
342 | $url = $tw->getAuthorizationUri(['oauth_token' => $reqToken->getRequestToken()]);
343 |
344 | // return to twitter login url
345 | return redirect((string)$url);
346 | }
347 | }
348 | ```
349 |
350 |
351 |
352 | ###Linkedin:
353 |
354 | Configuration:
355 | Add your Linkedin credentials to ``config/oauth-5-laravel.php``
356 |
357 | ```php
358 | 'Linkedin' => [
359 | 'client_id' => 'Your Linkedin API ID',
360 | 'client_secret' => 'Your Linkedin API Secret',
361 | ],
362 | ```
363 | In your Controller use the following code:
364 |
365 | ```php
366 |
367 | public function loginWithLinkedin(Request $request)
368 | {
369 | // get data from request
370 | $code = $request->get('code');
371 |
372 | $linkedinService = \OAuth::consumer('Linkedin');
373 |
374 |
375 | if ( ! is_null($code))
376 | {
377 | // This was a callback request from linkedin, get the token
378 | $token = $linkedinService->requestAccessToken($code);
379 |
380 | // Send a request with it. Please note that XML is the default format.
381 | $result = json_decode($linkedinService->request('/people/~?format=json'), true);
382 |
383 | // Show some of the resultant data
384 | echo 'Your linkedin first name is ' . $result['firstName'] . ' and your last name is ' . $result['lastName'];
385 |
386 | //Var_dump
387 | //display whole array.
388 | dd($result);
389 |
390 | }
391 | // if not ask for permission first
392 | else
393 | {
394 | // get linkedinService authorization
395 | $url = $linkedinService->getAuthorizationUri(['state'=>'DCEEFWF45453sdffef424']);
396 |
397 | // return to linkedin login url
398 | return redirect((string)$url);
399 | }
400 | }
401 |
402 | ```
403 | ###Yahoo:
404 |
405 | Configuration:
406 | Add your Yahoo credentials to ``config/oauth-5-laravel.php``
407 |
408 | ```php
409 | 'Yahoo' => [
410 | 'client_id' => 'Your Yahoo API KEY',
411 | 'client_secret' => 'Your Yahoo API Secret',
412 | ],
413 | ```
414 | In your Controller use the following code:
415 |
416 | ```php
417 |
418 | public function loginWithYahoo(Request $request)
419 | {
420 | // get data from request
421 | $token = $request->get('oauth_token');
422 | $verify = $request->get('oauth_verifier');
423 |
424 | \OAuth::setHttpClient('CurlClient');
425 |
426 | // get yahoo service
427 | $yh = \OAuth::consumer('Yahoo');
428 |
429 | // if code is provided get user data and sign in
430 | if ( ! is_null($token) && ! is_null($verify))
431 | {
432 | // This was a callback request from yahoo, get the token
433 | $token = $yh->requestAccessToken($token, $verify);
434 |
435 | $xid = [$token->getExtraParams()];
436 | $result = json_decode($yh->request('https://social.yahooapis.com/v1/user/' . $xid[0]['xoauth_yahoo_guid'] . '/profile?format=json'), true);
437 |
438 | //Var_dump
439 | //display whole array.
440 | dd($result);
441 | }
442 | // if not ask for permission first
443 | else
444 | {
445 | // get request token
446 | $reqToken = $yh->requestRequestToken();
447 |
448 | // get Authorization Uri sending the request token
449 | $url = $yh->getAuthorizationUri(['oauth_token' => $reqToken->getRequestToken()]);
450 |
451 | // return to yahoo login url
452 | return redirect((string)$url);
453 | }
454 | }
455 |
456 | ```
457 | ### More usage examples:
458 |
459 | For examples go [here](https://github.com/Lusitanian/PHPoAuthLib/tree/master/examples)
460 |
461 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "oriceon/oauth-5-laravel",
3 | "type": "library",
4 | "description": "OAuth Service Provider for Laravel 5",
5 | "keywords": ["OAuth", "Lusitanian", "laravel", "php"],
6 | "homepage": "https://github.com/oriceon/oauth-5-laravel",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Artdarek",
11 | "email": "artdarek@gmail.com",
12 | "role": "Developer"
13 | },
14 | {
15 | "name": "oriceon",
16 | "email": "oriceon@gmail.com",
17 | "role": "Developer"
18 | }
19 | ],
20 | "require": {
21 | "php": ">=5.4",
22 | "lusitanian/oauth": "*"
23 | },
24 | "require-dev": {
25 | "illuminate/support": "~5"
26 | },
27 | "require-all": true,
28 | "extra": {
29 | "laravel": {
30 | "providers": [
31 | "Artdarek\\OAuth\\OAuthServiceProvider"
32 | ],
33 | "aliases": {
34 | "OAuth" : "Artdarek\\OAuth\\Facade\\OAuth"
35 | }
36 | }
37 | },
38 | "autoload": {
39 | "psr-0": {
40 | "Artdarek\\OAuth": "src/"
41 | }
42 | },
43 | "minimum-stability": "dev"
44 | }
45 |
--------------------------------------------------------------------------------
/src/Artdarek/OAuth/Facade/OAuth.php:
--------------------------------------------------------------------------------
1 |
5 | * @copyright Copyright (c) 2013
6 | * @license http://www.opensource.org/licenses/mit-license.html MIT License
7 | */
8 |
9 | use Illuminate\Support\Facades\Facade;
10 |
11 | class OAuth extends Facade
12 | {
13 | /**
14 | * Get the registered name of the component.
15 | *
16 | * @return string
17 | */
18 | protected static function getFacadeAccessor()
19 | {
20 | return 'Artdarek\OAuth\OAuth';
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Artdarek/OAuth/OAuth.php:
--------------------------------------------------------------------------------
1 |
5 | * @copyright Copyright (c) 2013
6 | * @license http://www.opensource.org/licenses/mit-license.html MIT License
7 | */
8 |
9 | use \Config;
10 | use \URL;
11 |
12 | use \OAuth\ServiceFactory;
13 | use \OAuth\Common\Consumer\Credentials;
14 |
15 | class OAuth {
16 |
17 | /**
18 | * @var ServiceFactory
19 | */
20 | private $_serviceFactory;
21 |
22 | /**
23 | * Storege name from config
24 | *
25 | * @var string
26 | */
27 | private $storageClass = '\\OAuth\\Common\\Storage\\Session';
28 |
29 | /**
30 | * Client ID from config
31 | *
32 | * @var string
33 | */
34 | private $client_id;
35 |
36 | /**
37 | * Client secret from config
38 | *
39 | * @var string
40 | */
41 | private $client_secret;
42 |
43 | /**
44 | * Scope from config
45 | *
46 | * @var array
47 | */
48 | private $scope = [];
49 |
50 | /**
51 | * Constructor
52 | *
53 | * @param ServiceFactory $serviceFactory - (Dependency injection) If not provided, a ServiceFactory instance will be constructed.
54 | */
55 | public function __construct(ServiceFactory $serviceFactory = null)
56 | {
57 | if (null === $serviceFactory) {
58 | // Create the service factory
59 | $serviceFactory = new ServiceFactory();
60 | }
61 | $this->_serviceFactory = $serviceFactory;
62 | }
63 |
64 | /**
65 | * Detect config and set data from it
66 | *
67 | * @param string $service
68 | */
69 | public function setConfig($service)
70 | {
71 | $accessor = '::';
72 | // if config/oauth-4-laravel.php exists use this one
73 | if (Config::get('oauth-5-laravel.consumers') != null) {
74 | $accessor = '.';
75 | }
76 | $this->storageClass = Config::get("oauth-5-laravel{$accessor}storage", $this->storageClass);
77 | $this->client_id = Config::get("oauth-5-laravel{$accessor}consumers.$service.client_id");
78 | $this->client_secret = Config::get("oauth-5-laravel{$accessor}consumers.$service.client_secret");
79 | $this->scope = Config::get("oauth-5-laravel{$accessor}consumers.$service.scope", []);
80 | }
81 |
82 | /**
83 | * Create storage instance
84 | *
85 | * @param string $storageName
86 | *
87 | * @return OAuth\Common\\Storage
88 | */
89 | public function createStorageInstance($storageClass)
90 | {
91 | $storage = new $storageClass();
92 |
93 | return $storage;
94 | }
95 |
96 | /**
97 | * Set the http client object
98 | *
99 | * @param string $httpClientName
100 | *
101 | * @return void
102 | */
103 | public function setHttpClient($httpClientName)
104 | {
105 | $httpClientClass = "\\OAuth\\Common\\Http\\Client\\$httpClientName";
106 | $this->_serviceFactory->setHttpClient(new $httpClientClass());
107 | }
108 |
109 | /**
110 | * @param string $service
111 | * @param string $url
112 | * @param array $scope
113 | *
114 | * @return \OAuth\Common\Service\AbstractService
115 | */
116 | public function consumer($service, $url = null, $scope = null)
117 | {
118 | // get config
119 | $this->setConfig($service);
120 |
121 | // get storage object
122 | $storage = $this->createStorageInstance($this->storageClass);
123 |
124 | // create credentials object
125 | $credentials = new Credentials(
126 | $this->client_id,
127 | $this->client_secret,
128 | $url ? : URL::current()
129 | );
130 |
131 | // check if scopes were provided
132 | if (is_null($scope)) {
133 | // get scope from config (default to empty array)
134 | $scope = $this->scope;
135 | }
136 |
137 | // return the service consumer object
138 | return $this->_serviceFactory->createService($service, $credentials, $storage, $scope);
139 | }
140 | }
141 |
--------------------------------------------------------------------------------
/src/Artdarek/OAuth/OAuthLaravelSession.php:
--------------------------------------------------------------------------------
1 | hasAccessToken($service)) {
22 | return unserialize(Session::get('oauth.token.'.$service));
23 | }
24 |
25 | throw new TokenNotFoundException('Token not found in session, are you sure you stored it?');
26 | }
27 |
28 | /**
29 | * @param string $service
30 | * @param TokenInterface $token
31 | *
32 | * @return TokenStorageInterface
33 | */
34 | public function storeAccessToken($service, TokenInterface $token)
35 | {
36 | $serializedToken = serialize($token);
37 | Session::put('oauth.token.'.$service, $serializedToken);
38 |
39 | return $this;
40 | }
41 |
42 | /**
43 | * @param string $service
44 | *
45 | * @return bool
46 | */
47 | public function hasAccessToken($service)
48 | {
49 | return Session::has('oauth.token.'.$service);
50 | }
51 |
52 | /**
53 | * Delete the users token. Aka, log out.
54 | *
55 | * @param string $service
56 | *
57 | * @return TokenStorageInterface
58 | */
59 | public function clearToken($service)
60 | {
61 | Session::forget('oauth.token.'.$service);
62 | return $this;
63 | }
64 |
65 | /**
66 | * Delete *ALL* user tokens. Use with care. Most of the time you will likely
67 | * want to use clearToken() instead.
68 | *
69 | * @return TokenStorageInterface
70 | */
71 | public function clearAllTokens()
72 | {
73 | Session::forget('oauth.token');
74 | return $this;
75 | }
76 |
77 | /**
78 | * Store the authorization state related to a given service
79 | *
80 | * @param string $service
81 | * @param string $state
82 | *
83 | * @return TokenStorageInterface
84 | */
85 | public function storeAuthorizationState($service, $state)
86 | {
87 | Session::put('oauth.state.'.$service, $state);
88 | return $this;
89 | }
90 |
91 | /**
92 | * Check if an authorization state for a given service exists
93 | *
94 | * @param string $service
95 | *
96 | * @return bool
97 | */
98 | public function hasAuthorizationState($service)
99 | {
100 | return Session::has('oauth.state.'.$service);
101 | }
102 |
103 | /**
104 | * Retrieve the authorization state for a given service
105 | *
106 | * @param string $service
107 | *
108 | * @return string
109 | * @throws AuthorizationStateNotFoundException
110 | */
111 | public function retrieveAuthorizationState($service)
112 | {
113 | if ($this->hasAuthorizationState($service)) {
114 | return Session::get('oauth.state.'.$service);
115 | }
116 |
117 | throw new AuthorizationStateNotFoundException('State not found in session, are you sure you stored it?');
118 | }
119 |
120 | /**
121 | * Clear the authorization state of a given service
122 | *
123 | * @param string $service
124 | *
125 | * @return TokenStorageInterface
126 | */
127 | public function clearAuthorizationState($service)
128 | {
129 | Session::forget('oauth.state.'.$service);
130 | return $this;
131 | }
132 |
133 | /**
134 | * Delete *ALL* user authorization states. Use with care. Most of the time you will likely
135 | * want to use clearAuthorization() instead.
136 | *
137 | * @return TokenStorageInterface
138 | */
139 | public function clearAllAuthorizationStates()
140 | {
141 | Session::forget('oauth.state');
142 | return $this;
143 | }
144 | }
145 |
--------------------------------------------------------------------------------
/src/Artdarek/OAuth/OAuthServiceProvider.php:
--------------------------------------------------------------------------------
1 |
5 | * @copyright Copyright (c) 2013
6 | * @license http://www.opensource.org/licenses/mit-license.html MIT License
7 | */
8 |
9 | use Illuminate\Support\ServiceProvider;
10 |
11 | class OAuthServiceProvider extends ServiceProvider {
12 |
13 | /**
14 | * Indicates if loading of the provider is deferred.
15 | *
16 | * @var bool
17 | */
18 | protected $defer = false;
19 |
20 | /**
21 | * Bootstrap the application events.
22 | *
23 | * @return void
24 | */
25 | public function boot()
26 | {
27 | $this->publishes([
28 | __DIR__ . '/../../config/config.php' => config_path('oauth-5-laravel.php'),
29 | ], 'config');
30 | }
31 |
32 | /**
33 | * Register the service provider.
34 | *
35 | * @return void
36 | */
37 | public function register()
38 | {
39 | // Register 'oauth'
40 | $this->app->singleton(OAuth::class, function ($app) {
41 | // create oAuth instance
42 | $oauth = new OAuth();
43 |
44 | // return oAuth instance
45 | return $oauth;
46 | });
47 | }
48 |
49 | /**
50 | * Get the services provided by the provider.
51 | *
52 | * @return array
53 | */
54 | public function provides()
55 | {
56 | return [];
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/config/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oriceon/oauth-5-laravel/d08a8f0eaef64beef30308646b342aff9ff98265/src/config/.gitkeep
--------------------------------------------------------------------------------
/src/config/config.php:
--------------------------------------------------------------------------------
1 | '\\OAuth\\Common\\Storage\\Session',
15 |
16 | /**
17 | * Consumers
18 | */
19 | 'consumers' => [
20 |
21 | 'Facebook' => [
22 | 'client_id' => '',
23 | 'client_secret' => '',
24 | 'scope' => [],
25 | ],
26 |
27 | ]
28 |
29 | ];
30 |
--------------------------------------------------------------------------------