Skip to content

Commit

Permalink
Add twitch socialite auth provider
Browse files Browse the repository at this point in the history
  • Loading branch information
moutonnoireu committed Jan 29, 2018
1 parent 1d54404 commit 5e2bf7c
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ GOOGLE_APP_SECRET=false
OKTA_BASE_URL=false
OKTA_KEY=false
OKTA_SECRET=false
TWITCH_KEY=false
TWITCH_SECRET=false
TWITCH_REDIRECT_URI=false

# External services such as Gravatar
DISABLE_EXTERNAL_SERVICES=false
Expand Down
1 change: 1 addition & 0 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class EventServiceProvider extends ServiceProvider
'SocialiteProviders\Slack\SlackExtendSocialite@handle',
'SocialiteProviders\Azure\AzureExtendSocialite@handle',
'SocialiteProviders\Okta\OktaExtendSocialite@handle',
'SocialiteProviders\Twitch\TwitchExtendSocialite@handle',
],
];

Expand Down
2 changes: 1 addition & 1 deletion app/Services/SocialAuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SocialAuthService
protected $socialite;
protected $socialAccount;

protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta'];
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta', 'twitch'];

/**
* SocialAuthService constructor.
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"barryvdh/laravel-snappy": "^0.4.0",
"socialiteproviders/slack": "^3.0",
"socialiteproviders/microsoft-azure": "^3.0",
"socialiteproviders/okta": "^1.0"
"socialiteproviders/okta": "^1.0",
"socialiteproviders/twitch": "^3.0"
},
"require-dev": {
"filp/whoops": "~2.0",
Expand Down
7 changes: 7 additions & 0 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@
'redirect' => env('APP_URL') . '/login/service/okta/callback',
'base_url' => env('OKTA_BASE_URL'),
'name' => 'Okta',
],

'twitch' => [
'client_id' => env('TWITCH_KEY'),
'client_secret' => env('TWITCH_SECRET'),
'redirect' => env('TWITCH_REDIRECT_URI'),
'name' => 'Twitch',
],

'ldap' => [
Expand Down
59 changes: 59 additions & 0 deletions resources/assets/icons/twitch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5e2bf7c

Please sign in to comment.