Skip to content

Commit 5e2bf7c

Browse files
committed
Add twitch socialite auth provider
1 parent 1d54404 commit 5e2bf7c

6 files changed

Lines changed: 73 additions & 2 deletions

File tree

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ GOOGLE_APP_SECRET=false
4949
OKTA_BASE_URL=false
5050
OKTA_KEY=false
5151
OKTA_SECRET=false
52+
TWITCH_KEY=false
53+
TWITCH_SECRET=false
54+
TWITCH_REDIRECT_URI=false
5255

5356
# External services such as Gravatar
5457
DISABLE_EXTERNAL_SERVICES=false

app/Providers/EventServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class EventServiceProvider extends ServiceProvider
1818
'SocialiteProviders\Slack\SlackExtendSocialite@handle',
1919
'SocialiteProviders\Azure\AzureExtendSocialite@handle',
2020
'SocialiteProviders\Okta\OktaExtendSocialite@handle',
21+
'SocialiteProviders\Twitch\TwitchExtendSocialite@handle',
2122
],
2223
];
2324

app/Services/SocialAuthService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SocialAuthService
1616
protected $socialite;
1717
protected $socialAccount;
1818

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

2121
/**
2222
* SocialAuthService constructor.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"barryvdh/laravel-snappy": "^0.4.0",
1919
"socialiteproviders/slack": "^3.0",
2020
"socialiteproviders/microsoft-azure": "^3.0",
21-
"socialiteproviders/okta": "^1.0"
21+
"socialiteproviders/okta": "^1.0",
22+
"socialiteproviders/twitch": "^3.0"
2223
},
2324
"require-dev": {
2425
"filp/whoops": "~2.0",

config/services.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@
9292
'redirect' => env('APP_URL') . '/login/service/okta/callback',
9393
'base_url' => env('OKTA_BASE_URL'),
9494
'name' => 'Okta',
95+
],
96+
97+
'twitch' => [
98+
'client_id' => env('TWITCH_KEY'),
99+
'client_secret' => env('TWITCH_SECRET'),
100+
'redirect' => env('TWITCH_REDIRECT_URI'),
101+
'name' => 'Twitch',
95102
],
96103

97104
'ldap' => [

resources/assets/icons/twitch.svg

Lines changed: 59 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)