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
Honeybadger logo

Honeybadger

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

Honeybadger
Statamic logo

Statamic

The drop-in ready Laravel CMS you’re been waiting for. Go full-stack or headless, flat file or database – it’s up to you.

Statamic
Laravel Cloud logo

Laravel Cloud

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

Laravel Cloud
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Typesense Search logo

Typesense Search

Typesense is an open source, blazing-fast search engine, optimized for helping you build delightful search experiences for your sites and apps. Natively integrated with Laravel Scout.

Typesense Search
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech