The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

Twitch

socialiteproviders/twitch image

Twitch stats

Downloads
610.3K
Stars
23
Open Issues
0
Forks
9

View on GitHub →

Twitch OAuth2 Provider for Laravel Socialite

Twitch

composer require socialiteproviders/twitch

Installation & Basic Usage

Please see the Base Installation Guide, then follow the provider specific instructions below.

Add configuration to config/services.php

'twitch' => [
'client_id' => env('TWITCH_CLIENT_ID'),
'client_secret' => env('TWITCH_CLIENT_SECRET'),
'redirect' => env('TWITCH_REDIRECT_URI')
],

Add provider event listener

Configure the package's listener to listen for SocialiteWasCalled events.

Add the event to your listen[] array in app/Providers/EventServiceProvider. See the Base Installation Guide for detailed instructions.

protected $listen = [
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
// ... other providers
\SocialiteProviders\Twitch\TwitchExtendSocialite::class.'@handle',
],
];

Usage

You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):

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

Returned User fields

  • id
  • nickname (same as name)
  • name
  • email
  • avatar
SocialiteProviders photo

Socialite Providers for Laravel

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Socialiteproviders Twitch Related Articles

Come for the Simplicity, Stay for the Extensibility: Identity with FusionAuth image

Come for the Simplicity, Stay for the Extensibility: Identity with FusionAuth

Read article
DreamzTech logo

DreamzTech

Hire 6-10+ Yrs. experienced skilled Laravel Developers from DreamzTech. We ensure NDA protected, 100% quality delivery. Contact Us & Discuss Your Need.

DreamzTech
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Honeybadger logo

Honeybadger

Simple developer-focused application monitoring for Laravel. Error tracking, log management, uptime monitoring, status pages, and more!

Honeybadger
Securing Laravel logo

Securing Laravel

The essential security resource for Laravel devs, covering everything you need to keep your apps secure. Sign up to receive weekly security tips and monthly in depth articles, diving deep into security concepts you need to know!

Securing Laravel
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit