Last active
August 26, 2022 23:32
-
-
Save pbelyaev/e396d5c03cb32ac31959fa2038521f7b to your computer and use it in GitHub Desktop.
Laravel 5.2 Socialite Middleware Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* SocialiteFacebookController is just a stub. | |
* I'm not really sure how to create a route without controller or closure. | |
* Please, feel free to share this information :) | |
*/ | |
Route::get('auth/facebook', [ | |
'middleware' => 'App\Http\Middleware\SocialiteRedirectToProviderMiddleware:facebook', | |
'uses' => 'SocialiteFacebookController@index' | |
]); | |
Route::get('auth/facebook/callback', [ | |
'middleware' => 'App\Http\Middleware\SocialiteCallbackMiddleware:facebook', | |
'uses' => 'SocialiteFacebookController@store' | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment