![]() ![]() Next useful thing that comes to my mind is how to merge two or more social accounts into one. Click on the Twitter Login and you will be redirected back and logged in. Now we will add Twitter Login link and change FB Login link to use new route. Return Socialite::driver($provider)->redirect() Change callback route definition to this: Route::get('/callback/', public function redirect($provider) ![]() 'client_secret' => 'onPJd84dU1ZrHgsGmWCFBI4iv5octmWDLQooJ1TZix1T34ttjf',Ĭurrently we don't have the route we defined above in our app, so let's make it. 'client_id' => 'jvVgZoMJFDGF0nuSRFzrE4jO3', In the redirect field enter 'twitter' => [ For redirect we will use already built route but with additional parameter so we will be able to make distinction between different providers (in this case facebook and twitter). With this we can configure Socialite.Ĭopy Consumer Key (API Key) to client_id, Consumer Secret (API Secret) to client_secret. For development we will use placeholder address.Ĭlick on the Keys and Access Tokens tab. For production you can put your real website address. For website use or any other fully qualified url that can pass validation. Go to the Twitter Apps page, and click Create New App.Įnter the application name and description. Like with facebook, you need to use twitter panel for developers where you need to create the app. This time we will try to add an option to login with twitter. In the first part we installed socialite plugin, prepared configuration, made a service which will handle creating users with social accounts and made it work with facebook. ![]() This is part two of the Laravel 5.2 socialite auth tutorial. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |