Socialite
Get Socialite Login API Keys
- Google Captcha API
- Facebook API
- Twitter API
- Google + API
- GitHub API
- YouTube API
- Twitch TV API
- Instagram API
- 37 Signals API
Add More Socialite Logins
- See full list of providers: https://socialiteproviders.github.io
Steps
- Go to https://socialiteproviders.github.io and select the provider to be added.
-
From the projects root folder, in the terminal, run composer to get the needed package.
- Example:
composer require socialiteproviders/twitch - From the projects root folder run
composer update -
Add the service provider to
/config/services.php- Example:
'twitch' => [ 'client_id' => env('TWITCH_KEY'), 'client_secret' => env('TWITCH_SECRET'), 'redirect' => env('TWITCH_REDIRECT_URI'), ], -
Add the API credentials to
/.env- Example:
TWITCH_KEY=YOURKEYHERE TWITCH_SECRET=YOURSECRETHERE TWITCH_REDIRECT_URI=http://YOURWEBSITEURL.COM/social/handle/twitch -
Add the social media login link:
-
Example: In file
/resources/views/auth/login.blade.phpadd ONE of the following:- Conventional HTML:
<a href="" class="btn btn-lg btn-primary btn-block twitch">Twitch</a>- Use Laravel HTML Facade with Laravel Collective:
{!! html()->a(route('social.redirect', ['provider' => 'twitch']), 'Twitch', array('class' => 'btn btn-lg btn-primary btn-block twitch')) !!}
-